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

Deprecate InstrumentationLibraryInfo #4256

Merged

Conversation

jack-berg
Copy link
Member

Related to #4190.

  • Adjust ReadableSpan, SpanData to include accessor to InstrumentationScopeInfo, deprecate #getInstrumentationLibraryInfo()
  • Adjust MetricData to include accessor to InstrumentationScopeInfo, deprecate #getInstrumentationLibraryInfo()
  • Adjust LogData to include accessor to InstrumentationScopeInfo, deprecate #getInstrumentationLibraryInfo()

@jack-berg jack-berg requested a review from a user March 9, 2022 03:43
@jack-berg jack-berg requested a review from Oberon00 as a code owner March 9, 2022 03:43
byte[] schemaUrlUtf8,
List<Marshaler> logMarshalers) {
int size = 0;
size +=
MarshalerUtil.sizeMessage(
InstrumentationLibraryLogs.INSTRUMENTATION_LIBRARY, instrumentationLibrary);
InstrumentationLibraryLogs.INSTRUMENTATION_LIBRARY, instrumentationScope);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just merged the proto update, so think you need to merge main and update the keys now when marshaling

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it looks like the proto PR to change the field names hasn't merged yet: open-telemetry/opentelemetry-proto#362

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh sorry for assuming without actually checking

@@ -10,18 +10,21 @@

import org.junit.jupiter.api.Test;

/** Tests for {@link InstrumentationLibraryInfo}. */
/** Tests for {@link io.opentelemetry.sdk.common.InstrumentationLibraryInfo}. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some qualified imports got automatically added by intellij or something

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to qualify the imports, even in comments, or else you get an error for using deprecated classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thought if it's in the same package that wouldn't be an issue but maybe not

@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #4256 (9ef1f6c) into main (26c0429) will decrease coverage by 0.13%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #4256      +/-   ##
============================================
- Coverage     90.32%   90.19%   -0.14%     
- Complexity     4752     4753       +1     
============================================
  Files           553      554       +1     
  Lines         14611    14629      +18     
  Branches       1402     1403       +1     
============================================
- Hits          13197    13194       -3     
- Misses          954      975      +21     
  Partials        460      460              
Impacted Files Coverage Δ
...lemetry/sdk/common/InstrumentationLibraryInfo.java 100.00% <ø> (ø)
.../java/io/opentelemetry/sdk/logs/SdkLogEmitter.java 100.00% <ø> (ø)
...n/java/io/opentelemetry/sdk/logs/data/LogData.java 0.00% <0.00%> (ø)
...va/io/opentelemetry/sdk/logs/data/LogDataImpl.java 100.00% <ø> (ø)
.../io/opentelemetry/sdk/metrics/data/MetricData.java 85.00% <0.00%> (-4.48%) ⬇️
...ry/sdk/metrics/internal/aggregator/Aggregator.java 100.00% <ø> (ø)
...gregator/DoubleExponentialHistogramAggregator.java 100.00% <ø> (ø)
...internal/aggregator/DoubleHistogramAggregator.java 100.00% <ø> (ø)
...internal/aggregator/DoubleLastValueAggregator.java 100.00% <ø> (ø)
...trics/internal/aggregator/DoubleSumAggregator.java 100.00% <ø> (ø)
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26c0429...9ef1f6c. Read the comment docs.

@jack-berg jack-berg merged commit 59a6061 into open-telemetry:main Mar 14, 2022
@jkwatson-verta
Copy link

We all missed that this was a breaking change, since we added methods to public interfaces without a default implementation. :(

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.

4 participants