-
Notifications
You must be signed in to change notification settings - Fork 0
Plugins: Chore: Renamed instrumentation middleware to metrics middleware #5
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 #5
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
Codoki PR ReviewSummary: Rename instrumentation to metrics, decouple logging context Issues (Critical & High only)
Showing top 1 issues. Critical: 0, High: 1. See inline suggestions for more. Key Feedback (click to expand)
Confidence: 3/5 — Needs work before merge (1 high · status: Requires changes) Sequence DiagramsequenceDiagram
participant Caller
participant Metrics as MetricsMiddleware
participant CtxLog as ContextualLoggerMiddleware
participant LogMw as LoggerMiddleware
Caller->>Metrics: QueryData(req)
Metrics->>Metrics: instrumentPluginRequest()
Metrics->>CtxLog: QueryData(ctx, req)
CtxLog->>CtxLog: instrumentContext()
CtxLog->>LogMw: QueryData(ctx, req)
LogMw->>LogMw: logRequest()
LogMw-->>CtxLog: resp, err
CtxLog-->>Metrics: resp, err
Metrics-->>Caller: resp, err
React with 👍 or 👎 if you found this review useful. |
| func NewMetricsMiddleware(promRegisterer prometheus.Registerer, pluginRegistry registry.Service) plugins.ClientMiddleware { | ||
| imw := newMetricsMiddleware(promRegisterer, pluginRegistry) | ||
| return plugins.ClientMiddlewareFunc(func(next plugins.Client) plugins.Client { | ||
| imw.next = next |
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.
| imw.next = next | |
| return &MetricsMiddleware{pluginMetrics: imw.pluginMetrics, pluginRegistry: pluginRegistry, next: next} |
Mirrors ai-code-review-evaluation#3 for like-for-like benchmarking.
mainplugins/rename-instrumentation-middleware-to-metrics-middlewareOriginal PR excerpt: