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

Simplify how to call Guard methods #2894

Merged
merged 7 commits into from
Feb 16, 2022
Merged

Simplify how to call Guard methods #2894

merged 7 commits into from
Feb 16, 2022

Conversation

mic-max
Copy link
Contributor

@mic-max mic-max commented Feb 12, 2022

Fixes #2818 (comment)

Thanks for the suggestion @CodeBlanch and help with getting this working :)

Changes

paramName will work without having to add the nameof(myVar) argument.

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@mic-max mic-max requested a review from a team February 12, 2022 00:22
@codecov
Copy link

codecov bot commented Feb 12, 2022

Codecov Report

Merging #2894 (fd43cdd) into main (73b99b6) will decrease coverage by 0.01%.
The diff coverage is 93.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2894      +/-   ##
==========================================
- Coverage   84.21%   84.20%   -0.02%     
==========================================
  Files         251      252       +1     
  Lines        8889     8893       +4     
==========================================
+ Hits         7486     7488       +2     
- Misses       1403     1405       +2     
Impacted Files Coverage Δ
src/OpenTelemetry.Api/Internal/Guard.cs 0.00% <0.00%> (ø)
...y.Exporter.Prometheus/PrometheusExporterOptions.cs 84.21% <50.00%> (ø)
...c/OpenTelemetry/Logs/OpenTelemetryLoggerOptions.cs 72.72% <50.00%> (ø)
...c/OpenTelemetry/Metrics/MeterProviderExtensions.cs 30.30% <50.00%> (ø)
...rc/OpenTelemetry/Trace/TracerProviderExtensions.cs 40.00% <66.66%> (ø)
...OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs 91.48% <88.88%> (ø)
src/OpenTelemetry.Api/Baggage.cs 100.00% <100.00%> (ø)
.../Context/Propagation/CompositeTextMapPropagator.cs 83.33% <100.00%> (ø)
src/OpenTelemetry.Api/Context/RuntimeContext.cs 90.90% <100.00%> (ø)
src/OpenTelemetry.Api/Trace/SpanAttributes.cs 100.00% <100.00%> (ø)
... and 68 more

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

Nice! 👍

Copy link
Member

@alanwest alanwest left a comment

Choose a reason for hiding this comment

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

😮 Neato!

@alanwest alanwest merged commit d7afc1b into open-telemetry:main Feb 16, 2022
@mic-max mic-max deleted the guard-improve branch February 17, 2022 13:14
Copy link

@AHMAD697261 AHMAD697261 left a comment

Choose a reason for hiding this comment

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

That's great

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.

5 participants