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

response_size_histogram for ASGI instrumention #1782

Closed
imanshafiei540 opened this issue May 3, 2023 · 2 comments · Fixed by #1789
Closed

response_size_histogram for ASGI instrumention #1782

imanshafiei540 opened this issue May 3, 2023 · 2 comments · Fixed by #1789
Assignees

Comments

@imanshafiei540
Copy link
Contributor

Describe the solution you'd like
Can we have response_size_histogram inside the opentelemetry-instrumentation-asgi logic?
Currently, we do have access to content-length header from the response inside the OpenTelemetryMiddleware, so it would be beneficial that we can have the ability to record response_size like duration.

Describe alternatives you've considered
Currently, I'm thinking about disable the FastAPI auto instrumentation and implement both response size and duration.

Additional context
The only instrumentator I could find that have the ability to record response_size is opentelemetry-instrumentation-tornado (HTTP_SERVER_RESPONSE_SIZE).

Let me know if that makes sense.
Thanks.

@shalevr
Copy link
Member

shalevr commented May 4, 2023

According to the specification it seems possible to add http.server.response.size if there is access to this attribute.
This metric is optional, so maybe it's the reason it's not implemented.
Do you want to work on this issue?

@imanshafiei540
Copy link
Contributor Author

Hello @shalevr , Thank you for your response. I'm happy working on it.
I'll create a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants