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(api-metrics): add schemaUrl to meter creations #2529

Merged
merged 4 commits into from
Nov 1, 2021

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented Oct 11, 2021

Which problem is this PR solving?

Short description of the changes

  • Add a new option bag parameter as the third parameter to MeterProvider.getMeter.
  • Add new optional field schemaUrl to InstrumentationLibrary in @opentelemetry/core. This is not a breaking change.

@legendecas legendecas requested a review from a team as a code owner October 11, 2021 03:28
@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #2529 (2f442c8) into main (357ec92) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2529   +/-   ##
=======================================
  Coverage   93.07%   93.07%           
=======================================
  Files         140      140           
  Lines        5169     5169           
  Branches     1101     1101           
=======================================
  Hits         4811     4811           
  Misses        358      358           
Impacted Files Coverage Δ
...pentelemetry-sdk-metrics-base/src/MeterProvider.ts 88.57% <0.00%> (ø)

new Meter({
name,
version: config?.version,
// @ts-expect-error ts(2345) TODO: define the types in @opentelemetry/core
Copy link
Member

Choose a reason for hiding this comment

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

i wonder how could we can handle this more cleanly ? i expect this will happen commonly on the feature when experimental requires change on stable packages :/

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if it is possible to link packages/* to the lerna project in experimental/. Even if it is possible, I'd believe we need a solution to publish experimental packages apart from the stable ones, that would eventually require a separate lerna project? Maybe @dyladan can chime on this.

Copy link
Member

Choose a reason for hiding this comment

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

It is not possible to link them together with the current setup. We could go back to the way it was before where all packages are part of the same lerna repo but make scripts which call lerna commands only on specific packages and use the independent version scheme? Having two groups of packages in lerna seems to be a thorny bit of business that there is no clear cut solution for.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think going back is necessary now. I would prefer to investigate alternative to lerna that suit our use case to avoid putting effort inside it, WDYT ?

Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

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

similar to this
open-telemetry/opentelemetry-js-api#125

I think we should add 3rd param, without changing the 2nd one

@dyladan dyladan added this to In progress in Metrics API Oct 20, 2021
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

LGTM and agree version should be param and schemaUrl should be in an options object.

Is there already an issue to add schema url to the tracing API/SDK?

@legendecas
Copy link
Member Author

@aabmass it's been tracked here open-telemetry/opentelemetry-js-api#125

Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

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

lgtm

Metrics API automation moved this from In progress to Reviewer approved Oct 29, 2021
@dyladan dyladan merged commit 61cf8c5 into open-telemetry:main Nov 1, 2021
Metrics API automation moved this from Reviewer approved to Done Nov 1, 2021
@legendecas legendecas deleted the metrics-ff/schema-url branch November 1, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

7 participants