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

Return NoOp InstrumentationContext where possible #1590

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

kilink
Copy link
Member

@kilink kilink commented Jul 28, 2023

Change beginValidation to simply return the No-op InstrumentationContext if no document or QuerySignatureRepository are present. Additionally, only allocate tags in instrumentExecutionResult if there are actually errors, and avoid calling the get method on the registry supplier repeatedly.

Finally, update DefaultMeterRegistrySupplier to avoid locking when calling the get method.

Change beginValidation to simply return the No-op InstrumentationContext if no
document or QuerySignatureRepository are present. Additionally, only allocate
tags in instrumentExecutionResult if there are actually errors, and avoid
calling the get method on the registry supplier repeatedly.

Finally, update DefaultMeterRegistrySupplier to avoid locking when calling
the get method.
@kilink kilink force-pushed the metrics-instrumentation-cleanup branch from a0ef1eb to 68c1a02 Compare December 13, 2023 21:08
@kilink kilink merged commit bbb8d4a into master Dec 14, 2023
3 checks passed
@kilink kilink deleted the metrics-instrumentation-cleanup branch January 25, 2024 04:57
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.

2 participants