get recent http timers from log-cache: cf tail dora --json -t timer | jq '.batch[] | select(.timer.name=="http")'
See that timers have span_id and trace_id tags
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
[x] I have viewed signed and have submitted the Contributor License Agreement
[x] I have made this pull request to the main branch
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 https://github.com/cloudfoundry/routing-release/issues/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
[x] I have viewed signed and have submitted the Contributor License Agreement
[x] I have made this pull request to the
main
branch[x] I have run all the unit tests.
[ ] (Optional) I have run Routing Acceptance Tests and Routing Smoke Tests
[ ] (Optional) I have run CF Acceptance Tests