-
Notifications
You must be signed in to change notification settings - Fork 715
feat: fixing logstash url #4970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes involve modifying the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LogstashDatasource
participant Store
User->>LogstashDatasource: Initialize component
LogstashDatasource->>Store: Retrieve selected organization identifier
Store-->>LogstashDatasource: Return identifier
LogstashDatasource->>LogstashDatasource: Update content with new URL
LogstashDatasource->>Logstash: Send HTTP request to /api/{identifier}/default/_json
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
web/src/components/ingestion/logs/LogstashDatasource.vue (1)
Line range hint
62-65: Consider documenting the Basic Authentication requirement.The configuration includes Basic Authentication headers but doesn't provide guidance on how to obtain or format the [BASIC_PASSCODE].
Add a comment explaining the Basic Authentication format:
headers => { + # Basic Authentication: Base64 encoded "username:password" "Authorization" => "Basic [BASIC_PASSCODE]" "Content-Type" => "application/json" }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
web/src/components/ingestion/logs/LogstashDatasource.vue(1 hunks)
🔇 Additional comments (1)
web/src/components/ingestion/logs/LogstashDatasource.vue (1)
Line range hint 59-65: Add error handling for missing organization identifier.
The code assumes that store.state.selectedOrganization.identifier will always be available. Consider adding validation to handle cases where it might be undefined.
Let's verify if there's proper error handling in the store:
Consider adding a computed property with validation:
const organizationPath = computed(() => {
if (!store.state.selectedOrganization?.identifier) {
throw new Error('Organization identifier is required for Logstash configuration');
}
return `/api/${encodeURIComponent(store.state.selectedOrganization.identifier)}/default/_json`;
});Then use it in the template:
- url => "${endpoint.value.url}/api/${store.state.selectedOrganization.identifier}/default/_json"
+ url => "${endpoint.value.url}${organizationPath.value}"<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a garbage collection mechanism for the local cache, enhancing resource management. - **Improvements** - Enhanced error handling during configuration initialization for better debugging. - Updated time calculations to improve accuracy and consistency. - **Dependency Updates** - Updated versions of key dependencies to leverage new features and fixes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
7976da5 to
96fef86
Compare
Summary by CodeRabbit