refactor(metrics-sdk): rename InstrumentationLibrary -> InstrumentationScope - #2959
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2959 +/- ##
=======================================
Coverage 92.78% 92.78%
=======================================
Files 183 183
Lines 5921 5921
Branches 1257 1257
=======================================
Hits 5494 5494
Misses 427 427
|
| * feat: warn when hooked module is already loaded [#2926](https://github.com/open-telemetry/opentelemetry-js/pull/2926) @nozik | ||
| * feat: implement OSDetector [#2927](https://github.com/open-telemetry/opentelemetry-js/pull/2927) @rauno56 | ||
| * feat: implement HostDetector [#2921](https://github.com/open-telemetry/opentelemetry-js/pull/2921) @rauno56 | ||
| * refactor(metrics-sdk): rename InstrumentationLibrary -> InstrumentationScope [#2959](https://github.com/open-telemetry/opentelemetry-js/pull/2959) @pichlermarc |
There was a problem hiding this comment.
There are two CHANGELOG files: one in the root directory and one in the exprimental/. I find that people tend to overlook the one in the experimental/ directory. Maybe we should merge those two.
There was a problem hiding this comment.
I also picked the wrong one more than once. 😅
However, I added this entry in both CHANGELOG.md files intentionally as it adds InstrumentationScope to @opentelemetry/core (enhancement for stable), but also changes field names in the Metrics SDK (breaking for experimental).
There was a problem hiding this comment.
in this case you should modify both changelog files like you did.
There are two CHANGELOG files: one in the root directory and one in the
exprimental/. I find that people tend to overlook the one in theexperimental/directory. Maybe we should merge those two.
I thought about this, but I think it makes for a confusing changelog file.
There was a problem hiding this comment.
| * refactor(metrics-sdk): rename InstrumentationLibrary -> InstrumentationScope [#2959](https://github.com/open-telemetry/opentelemetry-js/pull/2959) @pichlermarc | |
| * `@opentelemetry/core`: add InstrumentationScope [#2959](https://github.com/open-telemetry/opentelemetry-js/pull/2959) @pichlermarc |
There was a problem hiding this comment.
Changed the changelog entry for stable in b5296d9 🙂
dyladan
left a comment
There was a problem hiding this comment.
Big PR but most renames like this are. LGTM and I don't think any were missed.
| * feat: warn when hooked module is already loaded [#2926](https://github.com/open-telemetry/opentelemetry-js/pull/2926) @nozik | ||
| * feat: implement OSDetector [#2927](https://github.com/open-telemetry/opentelemetry-js/pull/2927) @rauno56 | ||
| * feat: implement HostDetector [#2921](https://github.com/open-telemetry/opentelemetry-js/pull/2921) @rauno56 | ||
| * refactor(metrics-sdk): rename InstrumentationLibrary -> InstrumentationScope [#2959](https://github.com/open-telemetry/opentelemetry-js/pull/2959) @pichlermarc |
There was a problem hiding this comment.
in this case you should modify both changelog files like you did.
There are two CHANGELOG files: one in the root directory and one in the
exprimental/. I find that people tend to overlook the one in theexperimental/directory. Maybe we should merge those two.
I thought about this, but I think it makes for a confusing changelog file.
| * feat: warn when hooked module is already loaded [#2926](https://github.com/open-telemetry/opentelemetry-js/pull/2926) @nozik | ||
| * feat: implement OSDetector [#2927](https://github.com/open-telemetry/opentelemetry-js/pull/2927) @rauno56 | ||
| * feat: implement HostDetector [#2921](https://github.com/open-telemetry/opentelemetry-js/pull/2921) @rauno56 | ||
| * refactor(metrics-sdk): rename InstrumentationLibrary -> InstrumentationScope [#2959](https://github.com/open-telemetry/opentelemetry-js/pull/2959) @pichlermarc |
There was a problem hiding this comment.
| * refactor(metrics-sdk): rename InstrumentationLibrary -> InstrumentationScope [#2959](https://github.com/open-telemetry/opentelemetry-js/pull/2959) @pichlermarc | |
| * `@opentelemetry/core`: add InstrumentationScope [#2959](https://github.com/open-telemetry/opentelemetry-js/pull/2959) @pichlermarc |
legendecas
left a comment
There was a problem hiding this comment.
Overall LGTM. Just a minor naming question.
|
|
||
| export interface InstrumentationLibraryMetrics { | ||
| instrumentationLibrary: InstrumentationLibrary; | ||
| export interface ScopeMetrics { |
There was a problem hiding this comment.
Is InstrumentationScopeMetrics a name to be considered? Although it is somewhat verbose, we are not introducing any new term in the case.
There was a problem hiding this comment.
Oh, I found that this is the name in the OTLP proto.
There was a problem hiding this comment.
Oh, I found that this is the name in the OTLP proto.
I considered InstrumentationScopeMetrics at first, but I think having this to as close as possible to the OTLP proto would make sense. 🙂
I checked the other language SDKs but there does not seem to be a consensus on what to call it. Java uses this MetricData to send to the Exporter, .NET does not map the concept directly, and Python is currently in the process of changing it to ScopeMetrics. If that Python PR merges, we will have consistent naming across Python, and JS and proto. 🙂
There was a problem hiding this comment.
I think its fine if we're matching the proto
Which problem is this PR solving?
The spec renamed
InstrumentationLibrarytoInstrumentationScope. This PR renamesInstrumentationLibrarytoInstrumentationScopeto match the spec (Metrics ONLY)Type of change
How Has This Been Tested?
Checklist:
addedupdated