Skip to content

Correct way to instantiate Registries #56

@wonderhoss

Description

@wonderhoss

I am trying to use the promethus client in a Rack application using Grape.

Since Grape APIs do not have an initialize block, I am somewhat lost as to what the best place is to create the Registry and register metrics.

Am I meant to only ever use a single Client::Registry throughout my code or can I create new ones where I need them?
Will they share the registered metrics?

I suspect not, and if that is correct, I would appreciate some pointers as to the preferred way of handling the Registry. Should I wrap it in a Singleton?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions