-
Notifications
You must be signed in to change notification settings - Fork 805
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
refactor(metrics-sdk): rename InstrumentationLibrary -> InstrumentationScope #2959
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
|
CHANGELOG.md
Outdated
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the changelog entry for stable in b5296d9 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big PR but most renames like this are. LGTM and I don't think any were missed.
CHANGELOG.md
Outdated
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
CHANGELOG.md
Outdated
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Just a minor naming question.
@@ -56,14 +56,14 @@ export interface HistogramMetricData extends BaseMetricData { | |||
*/ | |||
export type MetricData = SingularMetricData | HistogramMetricData; | |||
|
|||
export interface InstrumentationLibraryMetrics { | |||
instrumentationLibrary: InstrumentationLibrary; | |||
export interface ScopeMetrics { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I found that this is the name in the OTLP proto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its fine if we're matching the proto
Which problem is this PR solving?
The spec renamed
InstrumentationLibrary
toInstrumentationScope
. This PR renamesInstrumentationLibrary
toInstrumentationScope
to match the spec (Metrics ONLY)Type of change
How Has This Been Tested?
Checklist:
addedupdated