Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Update dependencies #602
Update dependencies #602
Changes from all commits
9e54006
9d7961e
c284b05
0205ce9
9a3b5a2
ea65220
ca41692
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by 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.
Regarding the named meter, have we considered pass in the
SdkMeterProvider
as a parameter here. And create a meter in the function likeThere 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.
Alternative would be to just directly call
global::meter_provider
and get the GlobalMeterProvider for the application and create the meter by using this global provider. We calledglobal::set_meter_provider
here.Referring to their official doc for global::meter_provider.
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.
What is the implication here if we use default metrics instead of metrics created from a named Meter? Do we still have a way to tell if the metric is emitted by "apiserver"?
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 looked around to find this info and essentially the docs no longer reference this way of naming global metrics. It might exist somewhere in the library but besides the name, the code was a straight copy of the example docs: https://docs.rs/opentelemetry-prometheus/0.11.0/opentelemetry_prometheus/ I verified that the prometheus functionality seems to still work, but I don't have any context on if there was more to this namespacing than this.
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.
We might be able to set the global provider:
But its unclear if that will actually set it since we are setting the meter provider but the meter namespace is on the meter, not the provider. I can take a bit more time to research this and see if I can find a solid answer. We might also consider using
.with_resource(Resource::new([KeyValue::new("service.name", "my_app")]))
as described in https://github.com/OutThereLabs/actix-web-opentelemetry/blob/main/examples/server.rs. I'll have to see if I can pull the logs to confirm which approach solves this for us.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.
Replied in a new comment. I think we can pass this provider to the
run_server
and use the meter_provider to create a meter in therun_server
func like we did in the old commit.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 found how to add the apiserver back into the tracing so we should be good. FWIW the logs don't really have the namespacing I was worried about: