Skip to content

Can't Add Collectors During Setup #11

@Spinkelben

Description

@Spinkelben

With the change to use DI for injecting the ICollectorRegistry the CollectorRegistryInstance property of PrometheusOptions becomes useless. We used to configure our metrics like this.

app.UsePrometheusServer(prometheusOptions =>
{
    prometheusOptions.CollectorRegistryInstance.Add(new MySystemMetricCollector());
});

This no longer works. The property is null. If I create a new CollectorRegistry in this method it is ignored. So I would suggest you set it before invoking the setup function.

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