Skip to content

How to add custom collector? #231

@FixRM

Description

@FixRM

Hello, I'm trying to export existing monitoring statistics in Prometheus format using this library. I tried to create custom ICollector implementation and add it on startup like this: Metrics.DefaultCollectorRegistry.Add(new MyCollector());. The problem is that I got internal errors while writing to IMetricsWriter as it is not clear what methods should I call and in what order. Can you please point me to documentation or existing sample? I tried to figure that out from the Gauge sources, but It seems to be too complicated for me)

p.s. May be there is a better option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions