Skip to content
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

Support converting http timers to OTel traces #560

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

acrmp
Copy link
Member

@acrmp acrmp commented Apr 11, 2024

Description

Adds support in Forwarder Agent for converting timers tagged with trace and span ids to OpenTelemetry traces. Feature is optional and currently not active by default.

  • The temporary_emit_otel_traces property controls whether the Forwarder Agent converts timers to traces. An alternative implementation approach would have been to allow the ingress config for each consumer to declare that it wanted this feature enabled. The property was added to the Windows job for consistency although we don't expect it to be receiving http timers.
  • Timers with peertype Client are ignored.
  • At this stage the generated traces won't work with the span metrics connector as it expects a service.name attribute to be defined at the resource level. However it's not currently possible to configure the span metrics connector in otel-collector-release.

Depends on this gorouter change: cloudfoundry/gorouter#407

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing performed?

  • Unit tests
  • Integration tests
  • Acceptance tests

Checklist:

  • This PR is being made against the main branch, or relevant version branch
  • I have made corresponding changes to the documentation
  • I have added testing for my changes

If you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack

@acrmp acrmp requested a review from a team as a code owner April 11, 2024 22:14
ctlong
ctlong previously approved these changes Apr 15, 2024
ctlong and others added 2 commits April 15, 2024 19:40
Forwarder Agent forwards loggregator timers to OTel Collectors as OTLP
traces.

Signed-off-by: Andrew Crump <andrew.crump@broadcom.com>
Signed-off-by: Rebecca Roberts <rebecca.roberts@broadcom.com>
Signed-off-by: Matthew Kocher <matthew.kocher@broadcom.com>
- Adds temporary_emit_otel_traces property to forwarder agent to control
  whether to convert timers to traces and emit to OTel Collector.
- Default to false until we have more experience with this feature being
  activated.
- An alternative implementation would be to allow each destination to
  configure the types of envelopes it would like to receive, which
  seemed unnecessarily complex.
@acrmp acrmp force-pushed the otel-collector-client-timer-support branch from 1d4676c to baf8617 Compare April 15, 2024 19:41
@acrmp acrmp merged commit f03f32c into main Apr 16, 2024
6 checks passed
@acrmp acrmp deleted the otel-collector-client-timer-support branch April 16, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants