opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

don't throw class cast exception when we have a noop tracer, meter, logger

Open zeitlinger opened this issue 1 year ago • 6 comments

similar to https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/11934

zeitlinger avatar Aug 02 '24 13:08 zeitlinger

You can't make the api depend on the incubator; that introduces a circular dependency, since the incubator depends on the api.

jkwatson avatar Aug 03 '24 03:08 jkwatson

You can't make the api depend on the incubator; that introduces a circular dependency, since the incubator depends on the api.

right - this is real problem because of https://github.com/open-telemetry/opentelemetry-java/blob/963bc384c8fbac94c58f3ede6bfb47d2c4f17ffc/api/all/src/main/java/io/opentelemetry/api/trace/TracerProvider.java#L23-L25 - which is in the api project

we could deprecate the method

BTW, the same issue applies to all "Extended..." apis

zeitlinger avatar Aug 05 '24 08:08 zeitlinger

Codecov Report

Attention: Patch coverage is 97.88360% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.09%. Comparing base (1f6de35) to head (e7d7114). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ry/api/incubator/metrics/ExtendedDefaultMeter.java 96.22% 4 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6617      +/-   ##
============================================
+ Coverage     89.99%   90.09%   +0.10%     
- Complexity     6358     6390      +32     
============================================
  Files           703      711       +8     
  Lines         19147    19333     +186     
  Branches       1889     1891       +2     
============================================
+ Hits          17231    17418     +187     
+ Misses         1337     1335       -2     
- Partials        579      580       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 09 '24 08:08 codecov[bot]

@jack-berg can you check?

zeitlinger avatar Aug 12 '24 09:08 zeitlinger

  1. Code reuse by moving existing default implementations to internal package and removing the final modifier.

can you elaborate?

zeitlinger avatar Aug 27 '24 07:08 zeitlinger

  1. Testing graal both with and without the incubating artifact on the class path

added

zeitlinger avatar Aug 27 '24 08:08 zeitlinger

thanks @jack-berg

zeitlinger avatar Sep 06 '24 12:09 zeitlinger