-
Notifications
You must be signed in to change notification settings - Fork 838
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
Changes from 3 commits
b83bcbe
ae8dfbb
7d777eb
b5296d9
f37bc81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
|
||
import { HrTime } from '@opentelemetry/api'; | ||
import { MetricAttributes } from '@opentelemetry/api-metrics'; | ||
import { InstrumentationLibrary } from '@opentelemetry/core'; | ||
import { InstrumentationScope } from '@opentelemetry/core'; | ||
import { Resource } from '@opentelemetry/resources'; | ||
import { InstrumentDescriptor } from '../InstrumentDescriptor'; | ||
import { Histogram } from '../aggregator/types'; | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
I considered I checked the other language SDKs but there does not seem to be a consensus on what to call it. Java uses this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think its fine if we're matching the proto |
||
scope: InstrumentationScope; | ||
metrics: MetricData[]; | ||
} | ||
|
||
export interface ResourceMetrics { | ||
resource: Resource; | ||
instrumentationLibraryMetrics: InstrumentationLibraryMetrics[]; | ||
scopeMetrics: 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.
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.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 addsInstrumentationScope
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.
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.
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 🙂