-
Notifications
You must be signed in to change notification settings - Fork 822
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
feat(metric-reader): add metric-reader #2681
feat(metric-reader): add metric-reader #2681
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2681 +/- ##
==========================================
- Coverage 92.82% 92.72% -0.11%
==========================================
Files 153 155 +2
Lines 5267 5372 +105
Branches 1112 1133 +21
==========================================
+ Hits 4889 4981 +92
- Misses 378 391 +13
|
90a7581
to
fd9b6c5
Compare
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.
👍 nice work!
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
...rimental/packages/opentelemetry-sdk-metrics-base/src/export/PeriodicExportingMetricReader.ts
Outdated
Show resolved
Hide resolved
...rimental/packages/opentelemetry-sdk-metrics-base/src/export/PeriodicExportingMetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/ReaderResult.ts
Outdated
Show resolved
Hide resolved
cc771a8
to
1ec3150
Compare
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
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.
LGTM % nits
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricReader.ts
Outdated
Show resolved
Hide resolved
...al/packages/opentelemetry-sdk-metrics-base/test/export/PeriodicExportingMetricReader.test.ts
Outdated
Show resolved
Hide resolved
...al/packages/opentelemetry-sdk-metrics-base/test/export/PeriodicExportingMetricReader.test.ts
Outdated
Show resolved
Hide resolved
...al/packages/opentelemetry-sdk-metrics-base/test/export/PeriodicExportingMetricReader.test.ts
Outdated
Show resolved
Hide resolved
...al/packages/opentelemetry-sdk-metrics-base/test/export/PeriodicExportingMetricReader.test.ts
Outdated
Show resolved
Hide resolved
* Set the {@link MetricProducer} used by this instance. | ||
* | ||
* @param metricProducer | ||
*/ | ||
setMetricProducer(metricProducer: MetricProducer) { |
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.
Ah, is this taking the Java route of passing a metric-producer rather than hard-coding collect
to talk to static registry of metrics.
I'm wondering if we should update the specification so that this is the "default" specified mechanism and the .NET hook is an alternative option to make it more clear to implementers that wish to a hard-link between metric-reader implementation + the sdk. Did you find this confusing at all?
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.
It is confusing on the spec side. I've previously submitted issues like open-telemetry/opentelemetry-specification#2072 for it.
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 agree that it is somewhat confusing on the spec side, when I was reading it the same question described in the issue above popped into my mind. I think updating the spec would help in that regard.
…(), add TestMetricReader
…s to keep node 8 compatibility.
…nually in TimeoutError
151c6bb
to
0ff2c92
Compare
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.
LGTM thanks for the great work
Which problem is this PR solving?
This is the implementation of the
MetricReader
andPeriodicExportingMetricReader
described in the the OTel JavaScript Metrics SDK Design Doc and the Metrics SDK SpecOriginal issue text:
MetricReader
Periodic exporting metric reader
Closes #2590
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
opentelemetry-sdk-metric-base/test/export
Checklist: