Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aiohttp-server instrumentation creates metrics instance for each request and spam with warnings #2168

Open
vanchaxy opened this issue Feb 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vanchaxy
Copy link

Describe your environment
python 3.11, opentelemetry-instrumentation-aiohttp-server v0.43b0 (installed from git).

Steps to reproduce
Start aiohttp server with instrumentation and make several requests.

What is the expected behavior?
No warning shows

What is the actual behavior?
Warnings in logs for each request:

An instrument with name http.server.duration, type Histogram, unit ms and description measures the duration of the inbound HTTP request has been created already.
An instrument with name http.server.active_requests, type UpDownCounter, unit requests and description measures the number of concurrent HTTP requests those are currently in flight has been created already.

Additional context
Aiohttp instrumentation creates middleware that runs for each request and init metric each time. Instead, it should attach metrics to the app and only increment/decrement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant