-
Notifications
You must be signed in to change notification settings - Fork 46
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
Potential Bug with Dummy Metadata Subsegments #402
Comments
Excellent breakdown of the problem @danielebra. |
Thanks for the great summary here @danielebra! |
Hi again @danielebra! I'm taking a look at this now. |
For others who are also encountering this issue, please roll back the version of your Datadog Python Lambda layer to v82. We are working on a fix for this now in a new version. We'll post back here once that new version has been released. |
Fixes error `TypeError: Object of type Context is not JSON serializable` #402
Thanks for the swift support on this one @purple4reina @astuyve 🙏 |
Fixes error `TypeError: Object of type Context is not JSON serializable` #402
Fixes error `TypeError: Object of type Context is not JSON serializable` #402
Fixes error `TypeError: Object of type Context is not JSON serializable` #402
Fixes error `TypeError: Object of type Context is not JSON serializable` #402
@danielebra a new layer has been released! Thanks again for reporting this so quickly. Very much appreciated. |
Hi there,
I am experiencing an issue adding DataDog Python Tracing in a Lambda via the
handler
redirection approach. Would greatly appreciate insight from other members of the community or core maintainers.Expected Behavior
An application that is instrumented with ddtrace (python) emits an event to EventBridge. The event is picked up by SQS and then triggers a Lambda (python) that is instrumented with datadog. The traversal through these services created a distributed trace.
Actual Behavior
When the Python Lambda is invoked, an exception is raised during the preparation of the lambda handler.
Steps to Reproduce the Problem
Unit test that attempts to replicate this behaviour: https://github.com/danielebra/datadog-lambda-python/pull/1/files
Event to invoke Lambda with
DataDog Environment variables
Logical breakdown
The
_before
method in the LambaDecorator performs some actions to extract the trace context.an
SQS
context is extracted viaWe know the above has a complete context because
Extracted Datadog trace context from event or context
is loggedThen the
dd_context
is used as a subsegment (this is where the error occurs)The
build_segment
call above performs thejson.dumps
However,
metadata
is addtrace.context.Context
objectAdditionally, I have gathered these datapoints at runtime where I am experiencing this issue in AWS
Based on the above, I believe
dd_context
to be aContext
objectSpecifications
49
3.9.18
Stacktrace
Datadog debug logs
The text was updated successfully, but these errors were encountered: