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
ddtrace/tracer: add NewStartSpanConfig & WithStartSpanConfig API #2341
Conversation
BenchmarksBenchmark execution time: 2023-11-20 14:12:31 Comparing candidate commit bbbe437 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 39 metrics, 2 unstable metrics. |
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.
Looks good! Just added a few non-blocking comments.
Co-authored-by: Ahmed Mezghani <38987709+ahmed-mez@users.noreply.github.com>
Co-authored-by: Ahmed Mezghani <38987709+ahmed-mez@users.noreply.github.com>
What does this PR do?
Adds
NewStartSpanConfigandWithStartSpanConfigfunctions to allow to use config structs.Motivation
This API reduces the number of calls (in functional option form) in hot paths by giving the freedom to prepare a common span configuration in hot paths.
Microbenchmarks show that there are significant improvements:
Just running the functional options
Creating spans (more realistic)
Reviewer's Checklist
For Datadog employees:
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!