-
Notifications
You must be signed in to change notification settings - Fork 0
Plugins: Chore: Renamed instrumentation middleware to metrics middleware #3
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
base: main
Are you sure you want to change the base?
Plugins: Chore: Renamed instrumentation middleware to metrics middleware #3
Conversation
…are (#76186) * Plugins: Chore: Renamed instrumentation middleware to metrics middleware * Removed repeated logger attributes in middleware and contextual logger * renamed loggerParams to logParams * PR review suggestion * Add contextual logger middleware * Removed unused params from logRequest * Removed unwanted changes * Safer FromContext method * Removed traceID from logParams
WalkthroughThe changes introduce a new contextual logger middleware for plugin client requests, update logging interfaces to support context-based loggers, and refactor metrics middleware naming and usage. Middleware composition is updated to include the new contextual logger, and logging methods are modernized to use Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ContextualLoggerMiddleware
participant MetricsMiddleware
participant LoggerMiddleware
participant Plugin
Client->>ContextualLoggerMiddleware: QueryData/CallResource/CheckHealth/CollectMetrics
ContextualLoggerMiddleware->>ContextualLoggerMiddleware: Add plugin metadata to context
ContextualLoggerMiddleware->>MetricsMiddleware: Forward request with enriched context
MetricsMiddleware->>LoggerMiddleware: Forward request
LoggerMiddleware->>Plugin: Forward request
Plugin-->>LoggerMiddleware: Response
LoggerMiddleware-->>MetricsMiddleware: Response
MetricsMiddleware-->>ContextualLoggerMiddleware: Response
ContextualLoggerMiddleware-->>Client: Response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.2.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/product/migration-guide for migration instructions Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
🧰 Additional context used🧬 Code Graph Analysis (7)pkg/services/pluginsintegration/pluginsintegration.go (2)
pkg/plugins/log/fake.go (2)
pkg/plugins/log/logger.go (2)
pkg/services/pluginsintegration/clientmiddleware/logger_middleware.go (1)
pkg/services/pluginsintegration/clientmiddleware/metrics_middleware.go (2)
pkg/services/pluginsintegration/clientmiddleware/contextual_logger_middleware.go (3)
pkg/plugins/log/ifaces.go (2)
🔇 Additional comments (23)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had any further activity in the last 2 weeks. Thank you for your contributions! |
Test 3
Summary by CodeRabbit
New Features
Refactor
Chores