Skip to content

Instrumentation as a Plugin #277

Open

Description

@Quantumplation

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?

Activity

  1. pkqk commented on Aug 25, 2024

    @pkqk
    Member

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions