Closed agocs closed 1 month ago
Baseline | Candidate | |
---|---|---|
baseline_or_candidate | baseline | candidate |
git_branch | master | chris.agocs/parse_128_bit_trace_id_from_lambda_extension |
git_commit_date | 1727371427 | 1727373750 |
git_commit_sha | 1392830fdb | 0ba15ad2ef |
release_version | 1.40.0-SNAPSHOT~1392830fdb | 1.40.0-SNAPSHOT~0ba15ad2ef |
Found 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 15 unstable metrics.
Baseline | Candidate | |
---|---|---|
baseline_or_candidate | baseline | candidate |
end_time | 2024-09-26T18:12:14 | 2024-09-26T18:19:05 |
git_branch | master | chris.agocs/parse_128_bit_trace_id_from_lambda_extension |
git_commit_date | 1727371427 | 1727373750 |
git_commit_sha | 1392830fdb | 0ba15ad2ef |
release_version | 1.40.0-SNAPSHOT~1392830fdb | 1.40.0-SNAPSHOT~0ba15ad2ef |
start_time | 2024-09-26T18:12:00 | 2024-09-26T18:18:52 |
Found 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 18 unstable metrics.
Baseline | Candidate | |
---|---|---|
baseline_or_candidate | baseline | candidate |
git_branch | master | chris.agocs/parse_128_bit_trace_id_from_lambda_extension |
git_commit_date | 1727371427 | 1727373750 |
git_commit_sha | 1392830fdb | 0ba15ad2ef |
release_version | 1.40.0-SNAPSHOT~1392830fdb | 1.40.0-SNAPSHOT~0ba15ad2ef |
Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.
Hi @PerfectSlayer, I'm extending code that was written two years ago. Can you point me to an example of the context propagation API?
Sure, if pass the CoreTracer
instance as a notifyStartInvocation()
parameter, you can then use:
Extracted context = tracer.propagate().extract(response.headers(), (carrier, classifier) -> {
for (String headerName : carrier.names()) {
classifier.accept(headerName, carrier.get(headerName));
}
});
propagate()
gets the context propagation API and extract()
extract context from a carrier.
Here, your carrier are HTTP headers, and you need to have a quick glue to explain it how to iterate over headers key-values (the lambda as 2nd argument).
Using the context propagation API will ensure you will get the same behavior as any other instrumentations, respect customer config and benefits from any future evolution.
Thanks! I'll look into the failing checks and remove the old implementation of notifyStartInvocation()
in the morning.
What's the right way to new up a CoreTracer in the Groovy tests? This seems to be giving me some problems.
Using DDCoreSpecification
and tracerBuilder().build()
is the right way (plus tracer.close()
on cleanUp
).
Few things though:
Config
instance to the tracer builder using config()
Note there are also injectSysConfig()
and injectEnvConfig()
methods to help with config overrides.
Thanks @PerfectSlayer. CoreTracer ct = tracerBuilder().config(config).build()
was giving me null pointer exceptions, so I opted to get rid of Config config = Mock(Config)
. I honestly don't know why we were mocking config; I'm just doing my best to modify two year old code.
I'm just doing my best to modify two year old code.
And tests look in good shape right now :wink:
Is there anything you have trouble with or want to improve as part of your PR?
@PerfectSlayer No, I'm ready to merge if you are
What Does This Do
I've updated the Lambda extension so it is capable of returning a 128 bit trace ID when a tracer calls the
/lambda/start-invocation
endpoint in this PRAs per the RFC, the
This change modifies the function that calls
/lambda/start-invocation
, allowing it to pick out the upper 64 bits of the trace ID and set the resulting 128-bit trace ID in the extracted context.I labelled this with
tag: no release notes
because it just changes behavior between the tracer and the Lambda extension.Motivation
Step Function traces create 128 bit trace IDs. Soon everything else will too.
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: SVLS-5583