-
Notifications
You must be signed in to change notification settings - Fork 158
[WIP] OTel Bridge API support #1886
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| ExitTracer createScalaTxnTracer(); | ||
|
|
||
| default ExitTracer createTracer(String metricName, int flags) { |
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.
The createSegment API still generates an asynchronous tracer, which is not what we want. And from the bridge there's no easy way to register a signature to get a signatureId. This was the easiest way to get a normal, synchronous tracer.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1886 +/- ##
============================================
- Coverage 70.28% 70.24% -0.04%
- Complexity 10115 10123 +8
============================================
Files 855 860 +5
Lines 41108 41154 +46
Branches 6230 6234 +4
============================================
+ Hits 28891 28908 +17
- Misses 9400 9425 +25
- Partials 2817 2821 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
While this PR has been reviewed and approved, I'm changing it to a draft to prevent merging as there are ongoing discussions about the broader OTel strategy across APM and we want to make sure that all teams are in alignment on an approach. |
…axon/replace-otel-spans2
…axon/replace-otel-spans2
OTel attribute mapper impl
…lic-java-agent into saxon/replace-otel-spans2
OTel attribute mapping - Completed JSON, first pass of mappings
…lic-java-agent into saxon/replace-otel-spans2
…axon/replace-otel-spans2
JSON load fix
eb22fcb to
c8c10ff
Compare
…axon/replace-otel-spans2
Overview
The java agent supports auto configuring the OTel SDK to report data to New Relic. Spans that are created with the span api are orphaned from New Relic data structures though. This returns spans backed by NR traces to generate metric and DT data.
This change hooks the
SdkTracerProvider.tracerBuildermethod and returns our tracer builder. When spans are started, we attempt to create a tracer. If successful, we return aSpanimplementation backed by the tracer, otherwise we return a no op span.There is some special logic based on the span kind:
consumer
We start an OtherTransaction for
consumerspan kind.server
We start a transaction for server spans and turn it into a web transaction.
client
For client spans, we either turn it into a database span or an external based on the span attributes.
Configuration
opentelemetry.sdk.spans.enabledcan be use to disable the span behavior.opentelemetry.instrumentation.{instrumentation-scope}.enabledcan be used to disable spans for a specific Opentelemetry libraryRelated Github Issue
Include a link to the related GitHub issue, if applicable
Testing
The agent includes a suite of tests which should be used to
verify your changes don't break existing functionality. These tests will run with
Github Actions when a pull request is made. More details on running the tests locally can be found
here,
Checks