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

chore(api-metrics): clean up exports #3198

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Aug 24, 2022

Which problem is this PR solving?

@opentelemetry/api-metrics exports some classes and constants that are intended for internal use. In an effort to reduce the API surface before declaring metrics GA, this PR replaces the existing wildcard exports with explicit exports.

Related: #3158

Short description of the changes

Replaces the existing wildcard exports with explicit exports and removes export for:

  • NoopMeter
  • NoopMetric
  • NoopCounterMetric
  • NoopUpDownCounterMetric
  • NoopHistogramMetric
  • NoopObservableMetric
  • NoopObservableCounterMetric
  • NoopObservableGaugeMetric
  • NoopObservableUpDownCounterMetric
  • NOOP_COUNTER_METRIC
  • NOOP_HISTOGRAM_METRIC
  • NOOP_UP_DOWN_COUNTER_METRIC
  • NOOP_OBSERVABLE_COUNTER_METRIC
  • NOOP_OBSERVABLE_GAUGE_METRIC
  • NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC
  • NoopMeterProvider
  • NOOP_METER_PROVIDER

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Existing tests

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #3198 (b59aceb) into main (4e123b5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3198   +/-   ##
=======================================
  Coverage   93.18%   93.19%           
=======================================
  Files         195      196    +1     
  Lines        6472     6494   +22     
  Branches     1366     1371    +5     
=======================================
+ Hits         6031     6052   +21     
- Misses        441      442    +1     
Impacted Files Coverage Δ
...ackages/opentelemetry-api-metrics/src/NoopMeter.ts 97.36% <100.00%> (+0.14%) ⬆️
...ges/opentelemetry-sdk-metrics/src/MeterProvider.ts 100.00% <100.00%> (ø)
...entelemetry-instrumentation/src/instrumentation.ts 70.37% <0.00%> (-7.41%) ⬇️
...-trace-base/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️
.../src/platform/browser/export/BatchSpanProcessor.ts 45.00% <0.00%> (ø)
...emetry-core/src/platform/node/RandomIdGenerator.ts 93.75% <0.00%> (+6.25%) ⬆️
packages/opentelemetry-resources/karma.worker.js 100.00% <0.00%> (+100.00%) ⬆️
...ckages/opentelemetry-sdk-trace-web/karma.worker.js 100.00% <0.00%> (+100.00%) ⬆️
...kages/opentelemetry-sdk-trace-base/karma.worker.js 100.00% <0.00%> (+100.00%) ⬆️

@pichlermarc pichlermarc marked this pull request as ready for review August 24, 2022 16:09
@pichlermarc pichlermarc requested a review from a team August 24, 2022 16:09
@pichlermarc pichlermarc force-pushed the chore/cleanup-metrics-api-export branch from 90f311e to c50eca6 Compare August 30, 2022 08:47
@pichlermarc
Copy link
Member Author

Sorry for the force-push, something went wrong when I tried to merge main into my branch. Just removed the last commit and replaced it with a merge commit.

@pichlermarc pichlermarc added the api:metrics Issues and PRs related to the Metrics API label Sep 2, 2022
@legendecas legendecas merged commit d3adc22 into open-telemetry:main Sep 5, 2022
@pichlermarc pichlermarc deleted the chore/cleanup-metrics-api-export branch September 5, 2022 08:06
@legendecas legendecas added this to the Metrics GA milestone Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:metrics Issues and PRs related to the Metrics API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants