Skip to content

[Flask] request_hook for metrics attributes #3405

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

Open
TedaLIEz opened this issue Apr 3, 2025 · 0 comments
Open

[Flask] request_hook for metrics attributes #3405

TedaLIEz opened this issue Apr 3, 2025 · 0 comments

Comments

@TedaLIEz
Copy link

TedaLIEz commented Apr 3, 2025

What problem do you want to solve?

We want to customize the attributes of metrics sent via FlaskInstrumentor#instrument_app, we did this with spans via request_hook and response_hook, but we didn't find a way to do that with metrics.

Describe the solution you'd like

There is a request_hook and response_hook in FlaskInstrumentor#instrument_app, however, the hook itself only works for traces, which is span specifically.

I'd like to see that the request_hook can also apply to metrics, for which we can provide more context via the hook function object.

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

None

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

No branches or pull requests

1 participant