Skip to content
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

Instrumentation as a Plugin #277

Open
Quantumplation opened this issue Aug 24, 2024 · 1 comment
Open

Instrumentation as a Plugin #277

Quantumplation opened this issue Aug 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Quantumplation
Copy link
Contributor

Bramble currently exposes Prometheus metrics; I'd like to replace this with CloudWatch metrics instead.

Would it make sense to refactor instrumentation.go so that it operated as a plugin, so that users could configure a different metrics backends instead?

@pkqk
Copy link
Member

pkqk commented Aug 25, 2024

Hi @Quantumplation,

There's not much in instrumentation.go that's mostly some helpers to build up log output for request events. metrics.go has the prometheus implementation.

It could be refactored to allow plugging in another metrics implementation. As a first draft idea I think having a plugin return a metrics implementation interface (so the main plugin interface only needs one new method added) and that interface could then mirror the current metrics collection calls.

It does also look like you could use cloudwatch_exporter or something similar.

@pkqk pkqk added the enhancement New feature or request label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants