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

feat: add addExporter to Meter #482

Merged

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Nov 4, 2019

Which problem is this PR solving?

Short description of the changes

  • Add addExporter(exporter: MetricExporter) to Meter
  • Exporters are called each time a metric is updated. This is required to ensure the Prometheus exporter is up to date when its endpoint is called by the Metrics backend.

@codecov-io
Copy link

codecov-io commented Nov 4, 2019

Codecov Report

Merging #482 into master will decrease coverage by <.01%.
The diff coverage is 96.61%.

@@            Coverage Diff             @@
##           master     #482      +/-   ##
==========================================
- Coverage   94.98%   94.98%   -0.01%     
==========================================
  Files         136      136              
  Lines        6482     6478       -4     
  Branches      567      567              
==========================================
- Hits         6157     6153       -4     
  Misses        325      325
Impacted Files Coverage Δ
...kages/opentelemetry-metrics/test/mocks/Exporter.ts 100% <100%> (ø)
packages/opentelemetry-metrics/test/Meter.test.ts 100% <100%> (ø) ⬆️
packages/opentelemetry-metrics/src/Metric.ts 88.46% <100%> (ø) ⬆️
packages/opentelemetry-metrics/src/Utils.ts 100% <100%> (ø) ⬆️
packages/opentelemetry-metrics/src/Handle.ts 95.65% <100%> (+0.41%) ⬆️
packages/opentelemetry-metrics/src/Meter.ts 94.44% <89.47%> (-3%) ⬇️
...es/opentelemetry-node/src/instrumentation/utils.ts 90.47% <0%> (-9.53%) ⬇️
...entelemetry-exporter-jaeger/test/transform.test.ts 100% <0%> (ø) ⬆️
...opentelemetry-base/test/resources/resource.test.ts 100% <0%> (ø) ⬆️
...ges/opentelemetry-exporter-zipkin/src/transform.ts 100% <0%> (ø) ⬆️
... and 15 more

@dyladan
Copy link
Member Author

dyladan commented Nov 5, 2019

The only failing test is in @opentelemetry/plugin-dns and unrelated to this PR. Is there a way to rerun it or should I just ignore for now?

edit: it also only failed on node 11. Is there a flaky test?

edit again: now always failing?

@mayurkale22 mayurkale22 merged commit 6be9e1e into open-telemetry:master Nov 6, 2019
@Flarna Flarna deleted the add-exporter branch December 13, 2019 20:41
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
martinkuba pushed a commit to martinkuba/opentelemetry-js that referenced this pull request Mar 13, 2024
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
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.

5 participants