OpenTelemetry integration #307
Unanswered
alessio-locatelli
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MRE
For a pure
aiohttp
we can track requests / responses:Output:
However,
request_hook
andresponse_hook
are not triggered if a request is cached.Maybe I would like to add
span.set_attribute("custom_user_attribute_from_response_hook", "this_response_was_from_cache")
or something like that, butdef _request()
is not called if we have a cached response, so hooks are not called as well.Question
This may be a bit of a silly question as I am fairly new to telemetry, but what is the correct and simple way to track the number of cached responses with OpenTelemetry?
Perhaps there is a way to access aiohttp
self._trace_configs
, but I wonder about the way that does not require editingaiohttp-client-cache
source code.Related
Beta Was this translation helpful? Give feedback.
All reactions