feat: Add TraceInfo to HTTPStartStop envelopes #407
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A short explanation of the proposed change:
Adds the span ID and trace ID for each request to the corresponding HTTPStartStop envelopes as tags, if they're present.
An explanation of the use cases your change solves
Should help operators and developers to track their traces through gorouter (see
cloudfoundry/routing-release#308).
Also aids corresponding work within the OTel Collector to export HTTPStartStop envelopes as traces.
Instructions to functionally test the behavior change using operator interfaces (BOSH manifest, logs, curl, and metrics)
cf install-plugin log-cache
cf push dora -b ruby_buildpack
curl dora.cfapps.com
cf tail dora --json -t timer | jq '.batch[] | select(.timer.name=="http")'
Expected result after the change
HTTPStartStop envelopes emitted by Gorouter (converted to loggregator v2 timers in the UDP Forwarder Agent) are tagged with the corresponding HTTP request's trace ID and span ID.
Current result before the change
HTTPStartStop envelopes emitted by Gorouter (converted to loggregator v2 timers in the UDP Forwarder Agent) are not tagged with the corresponding HTTP request's trace ID and span ID.
Links to any other associated PRs
None
I have viewed signed and have submitted the Contributor License Agreement
I have made this pull request to the
main
branchI have run all the unit tests.
(Optional) I have run Routing Acceptance Tests and Routing Smoke Tests
(Optional) I have run CF Acceptance Tests