-
Notifications
You must be signed in to change notification settings - Fork 807
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: implement named meter #691
Conversation
There is no reason to call the registry the "basic" registry since there is no difference between a node meter and a web meter. That distinction is only for tracing as far as I'm aware. |
@@ -0,0 +1,29 @@ | |||
/*! |
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.
nit: meter_registry.ts => MeterRegistry.ts
/** | ||
* This class represents a basic tracer registry which platform libraries can extend | ||
*/ | ||
export class BasicMeterRegistry implements types.MeterRegistry { |
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 would prefer to keep MeterRegistry
instead of BasicMeterRegistry
, I don;t expect to see NodeMeterRegistry
or WebMeterRegistry
.
import { DEFAULT_CONFIG, MeterConfig } from './types'; | ||
|
||
/** | ||
* This class represents a basic tracer registry which platform libraries can extend |
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.
* This class represents a basic tracer registry which platform libraries can extend | |
* This class represents a basic meter registry which platform libraries can extend |
Codecov Report
@@ Coverage Diff @@
## master #691 +/- ##
==========================================
- Coverage 89.89% 89.71% -0.19%
==========================================
Files 217 216 -1
Lines 10276 10046 -230
Branches 940 936 -4
==========================================
- Hits 9238 9013 -225
+ Misses 1038 1033 -5
|
…ry-js into xiao/meter-registry
} | ||
|
||
getMeter( | ||
name: string = 'default', |
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.
This is same as open-telemetry/opentelemetry-specification#407 and #679, I would suggest to remove default for now and assign the names in examples and tests. We can come back to this and update based on the decision. @xiao-lix and @dyladan WDYT?
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.
Definitely name
should be a required property.
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.
Sounds good to me, but I checked out this PR #681 is approved, will it be merged? 🤔
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.
unlikely at this point that it will be merged in its current state. in any case, the spec clearly states that name is a required attribute
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.
instead of making name required, we are more likely to change the examples to contain better names. Right now many of them are "default" (my fault) which is not a great name and doesn't really help anyone understand the purpose of the name
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 see, will remove default for now and assign better names in examples and tests.
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
Please fix the build |
Could you please update the PR with respect to #699 (change "Registry" to "Provider")? |
Please wait until @bogdandrutu's concerns are addressed. I don't want to have to keep changing this over and over. |
Which problem is this PR solving?
Short description of the changes