Skip to content

flask: different http.server.active_requests metrics description and unit #4093

@xrmx

Description

@xrmx

Depending on how the flask app is instrumented two different counter are initialized for http.server.active_requests metrics.

            active_requests_counter = meter.create_up_down_counter(
                name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
                unit="{request}",
                description="Number of active HTTP server requests.",
            )

vs

        active_requests_counter = meter.create_up_down_counter(
            name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
            unit="requests",
            description="measures the number of concurrent HTTP requests that are currently in-flight",
        )

The first one matches the 1.21.0 spec that we are targeting for stable, but the last one is the one used in auto-instrumentation and should be fixed. BTW other instrumentation are using the helper create_http_server_active_requests from the semconv package.

Spotted by weaver registry live-check.

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