Skip to content

Make UseOpenTelemetryPrometheusScrapingEndpoint a real endpoint #4449

@JamesNK

Description

@JamesNK

Feature Request

UseOpenTelemetryPrometheusScrapingEndpoint is middleware that provides an endpoint for Prometheus scraping.

This kind of feature is usually provided by an endpoint using ASP.NET Core endpoint routing. For example, MapHealthChecks configures the health probe endpoint. See https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-7.0#basic-health-probe.

An endpoint allows the feature to more easily hook into other endpoint-aware middleware and routing features. Also, routing is very fast, and the check for the scraping path can happen at the same time as routing instead of extra overhead.

Describe the solution you'd like:

Add a MapPrometheusScraping extension method for this task.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions