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

NR-134815 Treat OTel WithSpan annotation as Trace #1841

Merged
merged 3 commits into from Apr 5, 2024

Conversation

sdaubin
Copy link
Collaborator

@sdaubin sdaubin commented Apr 4, 2024

NR-134815

Overview

There is a java OpenTelemetry library that contains a WithSpan annotation designed to work the same as our Trace annotation. By adding support for this annotation we increase our adoption of Otel. It allows customers to use this open source annotation instead of our proprietary annotation (in many cases).

I think we can defer suppressing this instrumentation (otel.instrumentation.opentelemetry-instrumentation-annotations.exclude-methods) and adding support for otel.instrumentation.methods.include until later.

Note that OTel properties can be set through environment or system properties, like our agent, and eventually through a config file. We can use our existing otel instrumentation model to get access to the normalized version of the instrumentation settings to include and exclude methods and pass those to the core agent through the bridge.

https://opentelemetry.io/docs/languages/java/automatic/annotations/

Related Github Issue

https://new-relic.atlassian.net/issues/NR-134815

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

  • Your contributions are backwards compatible with relevant frameworks and APIs.
  • Your code does not contain any breaking changes. Otherwise please describe.
  • Your code does not introduce any new dependencies. Otherwise please describe.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.87%. Comparing base (ef98cb6) to head (504507c).

❗ Current head 504507c differs from pull request most recent head da2f302. Consider uploading reports for the commit da2f302 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1841      +/-   ##
============================================
+ Coverage     70.01%   70.87%   +0.85%     
- Complexity     9874     9972      +98     
============================================
  Files           829      829              
  Lines         39984    39985       +1     
  Branches       6058     6058              
============================================
+ Hits          27995    28338     +343     
+ Misses         9305     8916     -389     
- Partials       2684     2731      +47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@deleonenriqueta deleonenriqueta merged commit c3a1f53 into main Apr 5, 2024
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants