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(sdk-metrics): clean up exports #3197

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Aug 24, 2022

Which problem is this PR solving?

@opentelemetry/sdk-metrics exports some classes and functions 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:

  • AccumulationRecord
  • Aggregator
  • AggregatorKind
  • Accumulation
  • CollectionResult
  • createInstrumentDescriptor
  • createInstrumentDescriptorWithView
  • isDescriptorCompatibleWith
  • TimeoutError

Type of change

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • 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 #3197 (291470c) into main (a5abee6) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3197   +/-   ##
=======================================
  Coverage   93.21%   93.21%           
=======================================
  Files         196      196           
  Lines        6443     6443           
  Branches     1363     1363           
=======================================
  Hits         6006     6006           
  Misses        437      437           
Impacted Files Coverage Δ
...opentelemetry-sdk-metrics/src/export/MetricData.ts 100.00% <ø> (ø)

@pichlermarc pichlermarc marked this pull request as ready for review August 24, 2022 14:22
@pichlermarc pichlermarc requested a review from a team August 24, 2022 14:22
Copy link
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this.

export { TimeoutError } from './utils';
export * from './view/Aggregation';
export * from './view/View';
export {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 We should be explicit about what is exported.

experimental/CHANGELOG.md Outdated Show resolved Hide resolved
experimental/CHANGELOG.md Outdated Show resolved Hide resolved
@legendecas legendecas merged commit d4ab03f into open-telemetry:main Aug 29, 2022
@pichlermarc pichlermarc deleted the chore/cleanup-metrics-sdk-export branch August 29, 2022 09:07
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants