Skip to content

Conversation

@akshayutture-augment
Copy link

@akshayutture-augment akshayutture-augment commented Nov 14, 2025

Test 3


Replicated from ai-code-review-evaluation/grafana-cursor#3


Note

Introduce context-aware logging via a new middleware and logger API, rename instrumentation middleware to metrics, and wire the new middlewares into the plugin client stack.

  • Plugins Integration:
    • New middleware: pkg/services/pluginsintegration/clientmiddleware/contextual_logger_middleware.go injects contextual attributes into request context.
    • Metrics middleware rename: InstrumentationMiddlewareMetricsMiddleware with same Prometheus metrics; updated constructors/tests and wiring in CreateMiddlewares.
    • Logger middleware: now logs via logger.FromContext(ctx) and simplifies parameters; removed direct context attribute extraction.
  • Logging API:
    • pkg/plugins/log: switch variadics to ...any and add Logger.FromContext(context.Context) Logger; implement in logger.go and test logger fake.go.

Written by Cursor Bugbot for commit 00393c2. Configure here.

…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
@akshayutture-augment
Copy link
Author

cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants