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

Deprecation of pdata methods following OTLP v0.15.0 #5076

Conversation

codeboten
Copy link
Contributor

@codeboten codeboten commented Mar 23, 2022

Follow up to #5064

Adding deprecation methods for the following pdata methods:

  • InstrumentationLibrary is now Scope
  • InstrumentationLibrarySpans is now ScopeSpans
  • InstrumentationLibraryLogs is now ScopeLogs
  • InstrumentationLibraryMetrics is now ScopeMetrics

Fixes #5073 #5072

@tigrannajaryan
Copy link
Member

Does this implement the graceful transition rules or it will be in a separate PR?

@codeboten
Copy link
Contributor Author

@tigrannajaryan it does not implement them yet. I will do so before marking it ready for review 👍

@codeboten codeboten force-pushed the codeboten/deprecate-instrumentation-library branch from 9adbe8a to 3972404 Compare March 24, 2022 15:17
@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #5076 (f496cd7) into main (cb868e2) will decrease coverage by 0.09%.
The diff coverage is 90.19%.

@@            Coverage Diff             @@
##             main    #5076      +/-   ##
==========================================
- Coverage   90.00%   89.90%   -0.10%     
==========================================
  Files         183      183              
  Lines       11040    11052      +12     
==========================================
  Hits         9936     9936              
- Misses        882      894      +12     
  Partials      222      222              
Impacted Files Coverage Δ
model/internal/pdata/logs.go 81.48% <20.00%> (-14.18%) ⬇️
model/internal/pdata/traces.go 77.77% <20.00%> (-13.53%) ⬇️
model/internal/pdata/metrics.go 87.37% <33.33%> (-3.54%) ⬇️
model/internal/pdata/generated_log.go 96.65% <96.66%> (ø)
model/internal/pdata/generated_metrics.go 97.00% <96.66%> (ø)
model/internal/pdata/generated_trace.go 96.89% <96.66%> (ø)
internal/otlptext/databuffer.go 100.00% <100.00%> (ø)
internal/otlptext/logs.go 100.00% <100.00%> (ø)
internal/otlptext/metrics.go 100.00% <100.00%> (ø)
internal/otlptext/traces.go 100.00% <100.00%> (ø)
... and 4 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 cb868e2...f496cd7. Read the comment docs.

@codeboten codeboten force-pushed the codeboten/deprecate-instrumentation-library branch from 3972404 to 55d4787 Compare March 24, 2022 15:41
@codeboten codeboten marked this pull request as ready for review March 24, 2022 17:56
@codeboten codeboten requested review from a team and bogdandrutu March 24, 2022 17:56
Alex Boten added 2 commits March 24, 2022 11:46
Adding deprecation methods for the following pdata methods:
  - InstrumentationLibrary is now Scope
  - InstrumentationLibrarySpans is now ScopeSpans
  - InstrumentationLibraryLogs is now ScopeLogs
  - InstrumentationLibraryMetrics is now ScopeMetrics
@codeboten codeboten force-pushed the codeboten/deprecate-instrumentation-library branch from e3f949c to 4425688 Compare March 24, 2022 18:47
@codeboten
Copy link
Contributor Author

codeboten commented Mar 24, 2022

Sorry @tigrannajaryan I misinterpreted the question in your comment and thought you were talking about the whether this PR would include the deprecated methods to allow users of pdata to transition off of the old names. Those are now included in this PR.

The update to support the transition rules will be done as a separate PR to address #5074

@tigrannajaryan
Copy link
Member

Sorry @tigrannajaryan I misinterpreted the question in your comment and thought you were talking about the whether this PR would include the deprecated methods to allow users of pdata to transition off of the old names. Those are now included in this PR.

The update to support the transition rules will be done as a separate PR to address #5074

OK. Let's plan to do this work before the next release. We want the new release to handle the transition as it is described in the proto spec.

@codeboten
Copy link
Contributor Author

💯

@tigrannajaryan i started here #5085

@@ -51,24 +51,24 @@ var resourceLogs = &messageValueStruct{
resourceField,
schemaURLField,
&sliceField{
fieldName: "InstrumentationLibraryLogs",
fieldName: "ScopeLogs",
Copy link
Member

Choose a reason for hiding this comment

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

We still need to work with deprecated field InstrumentationLibraryLogs. I assume the field will be added back in #5085

docs/troubleshooting.md Show resolved Hide resolved
@bogdandrutu bogdandrutu merged commit 1d5fdd1 into open-telemetry:main Mar 28, 2022
Nicholaswang pushed a commit to Nicholaswang/opentelemetry-collector that referenced this pull request Jun 7, 2022
)

* Deprecation of pdata methods following OTLP v0.15.0

Adding deprecation methods for the following pdata methods:
  - InstrumentationLibrary is now Scope
  - InstrumentationLibrarySpans is now ScopeSpans
  - InstrumentationLibraryLogs is now ScopeLogs
  - InstrumentationLibraryMetrics is now ScopeMetrics

* update changelog

* add deprecated method on resource spans/metrics/logs

* add InstrumentationLibrary deprecation method
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.

deprecate InstrumentationLibrary* in pdata in favour of Scope*
4 participants