open-telemetry / open-telemetry/opentelemetry-python-contrib

Django's http_server_active_requests guage has wrong description

Open Beginner friendly
#2,513 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

I am seeing the following error in my collector when prometheus retrieves /metrics API:

net/http/server.go:2039
2024-05-10T00:53:49.988Z error prometheusexporter@v0.100.0/log.go:23 error gathering metrics: 16 error(s) occurred:
* collected metric pulp_http_server_active_requests label:{name:"http_flavor" value:"1.1"} label:{name:"http_host" value:"pulp-api-svc.pulp-stage.svc.cluster.local:24817"} label:{name:"http_method" value:"PATCH"} label:{name:"http_scheme" value:"http"} label:{name:"http_server_name" value:"::"} label:{name:"job" value:"pulp-api"} gauge:{value:0} has help "measures the number of concurrent HTTP requests that are currently in-flight" but should have "measures the number of concurrent HTTP requests those are currently in flight"
* collected metric pulp_http_server_active_requests label:{name:"http_flavor" value:"1.1"} label:{name:"http_host" value:"10.129.2.18:24817"} label:{name:"http_method" value:"GET"} label:{name:"http_scheme" value:"http"} label:{name:"http_server_name" value:"::"} label:{name:"job" value:"pulp-api"} gauge:{value:0} has help "measures the number of concurrent HTTP requests that are currently in-flight" but should have "measures the number of concurrent HTTP requests those are currently in flight"

I believe the help text here[0] and here[1] needs to be updated to match the rest of the MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS instruments[2].

[0] https://github.com/open-telemetry/opentelemetry-python-contrib/blob/eabceff062372d3dd17d2dc790d34919f0c94b5f/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py#L330
[1] https://github.com/open-telemetry/opentelemetry-python-contrib/blob/eabceff062372d3dd17d2dc790d34919f0c94b5f/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py#L216
[2] https://github.com/open-telemetry/opentelemetry-python-contrib/blob/eabceff062372d3dd17d2dc790d34919f0c94b5f/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py#L146

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the HTTP_SERVER_ACTIVE_REQUESTS help-text definitions in instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/init.py and instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/init.py, using the Pyramid definition in callbacks.py for comparison. Update the descriptions so the emitted metric help text matches the other HTTP_SERVER_ACTIVE_REQUESTS instruments, then run the relevant instrumentation tests and verify the collector no longer reports a help mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.