-
Couldn't load subscription status.
- Fork 48
feat: use dd-trace-go v2 #206
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
base: main
Are you sure you want to change the base?
Conversation
|
dd-trace-go v2.1.0 enables client-side stats computation by default. Can we turn it off by default? |
Updated accordingly. |
# Conflicts: # go.mod # go.sum # internal/extension/extension.go
eed3640 to
5eaac2d
Compare
|
@joeyzhao2018 i think we also need to disable telemetry by default too DataDog/dd-trace-go#3808 |
|
That would be fantastic @happynancee if we could also land that change 👍
|
I explicitly set DD_INSTRUMENTATION_TELEMETRY_ENABLED to false in the tracer initialization code block. |
Thanks @joeyzhao2018 - can see the change in 4d70949. 👍 |
| } else { | ||
| logger.Error(fmt.Errorf("could not get sampling priority from getSamplingPriority()")) | ||
| } | ||
| logger.Error(fmt.Errorf("could not get sampling priority from spanContext.SamplingPriority()")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spanContext.SamplingPriority is directly available in dd-trace-go v2. No longer need the handling for the adapter case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks great!
One question. For a customer who is currently using the v1 tracer in their lambda code, how will upgrading to this new version affect them? Will their spans all of a sudden be orphaned? Will their code even compile?
This is an important question for go because our customers will rely heavily on adding their own custom instrumentation to their functions.
To clarify, this is indeed a breaking change as many of the APIs are different in dd-trace-go V2. We will need to bump the major version when releasing it next time and reference the migration guide. But it shouldn't cause any orphaned spans or any feature-wise issues.
Again, the customers do need to migrate and adapt to the new APIs. However, since we don't release go tracer as layers, releasing a datadog-lambda-go v2 doesn't block us to do any fix in v1 if needed. |
FYI, doing a major version bump in golang is VERY different from other languages. Read about it here. It requires copying your entire source into a new |
Thank you for sharing this! This is very helpful. After thinking more about it and some research, I think we actually have to stay as v1 following go's convention. Because there's no breaking change in the public apis for all the lambda wrappers. In other words, it will be backward compatible. What I said earlier was inaccurate by the As for migrating the dd-trace-go, we are still doing it and probably going to use Orchestrion as a few customers have already requested it. I don't think this PR is blocked by that migration though. |
|
So TL;DR @joeyzhao2018 we should expect to see this PR canned/closed and a new upcoming This is how I read DataDog/dd-trace-go#3943? |
|
Is there an update on this? We have a medium CVE that we'd like to get rid of (CVE-2020-8911) but we cannot until this library uses the tracer v2 library. |


What does this PR do?
Motivation
#204
Implementation Details
Span.StartChild. In "Serverless Universal Instrumentation", that span is created in the agent instead of the tracer.Testing Guidelines
Additional Notes
Types of changes
Checklist