You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, it seems like the botocore instrumentation in this layer is recording only basic metadata for boto3 requests in my Lambda code. I was hoping to re-configure it to include the request and response body parameters as metadata - for a subset of services & operations.
I see opentelemetry-python-contrib's BotocoreInstrumentor supports request_hook and response_hook parameters that look like they should be able to fill this purpose (by e.g. calling span.set_attribute in the hook to add additional information).
...But when I try to set up instrumentation with these hooks in my Lambda code, like below:
...I find my hooks are not called - and I get a log entry suggesting it's because tracing was already set up before my function code initialized:
[WARNING] 2025-01-22T16:52:38.974Z Attempting to instrument while already instrumented
Sorry if I'm coming at this from the wrong direction, as pretty new to it all... But is there no way to re-configure the botocore instrumentation with this Lambda layer? Or no alternative way to request API request & response params get attached to the boto traces?
The text was updated successfully, but these errors were encountered:
By default, it seems like the botocore instrumentation in this layer is recording only basic metadata for boto3 requests in my Lambda code. I was hoping to re-configure it to include the request and response body parameters as metadata - for a subset of services & operations.
I see opentelemetry-python-contrib's
BotocoreInstrumentor
supportsrequest_hook
andresponse_hook
parameters that look like they should be able to fill this purpose (by e.g. callingspan.set_attribute
in the hook to add additional information)....But when I try to set up instrumentation with these hooks in my Lambda code, like below:
...I find my hooks are not called - and I get a log entry suggesting it's because tracing was already set up before my function code initialized:
Sorry if I'm coming at this from the wrong direction, as pretty new to it all... But is there no way to re-configure the botocore instrumentation with this Lambda layer? Or no alternative way to request API request & response params get attached to the boto traces?
The text was updated successfully, but these errors were encountered: