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

Add null check when a view does not match an instrument #3285

Merged
merged 2 commits into from
May 18, 2022

Conversation

alanwest
Copy link
Member

Fixes #3283

Bug was causing superfluous warnings in diagnostic logs when an instrument didn't match a view config. For example:

2022-05-17T19:29:28.8189110Z:View Configuration ignored for Instrument '{0}', Meter '{1}'. Reason: '{2}'. Measurements from the instrument will use default configuration for Aggregation. Suggested action: '{3}'{http.client.duration}{OpenTelemetry.Instrumentation.Http}{Object reference not set to an instance of an object.}{Fix the view configuration.}

@reyang
Copy link
Member

reyang commented May 17, 2022

Need a changelog entry?

@codecov
Copy link

codecov bot commented May 17, 2022

Codecov Report

Merging #3285 (c405a04) into main (a383463) will increase coverage by 0.20%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3285      +/-   ##
==========================================
+ Coverage   85.39%   85.60%   +0.20%     
==========================================
  Files         255      263       +8     
  Lines        9355     9487     +132     
==========================================
+ Hits         7989     8121     +132     
  Misses       1366     1366              
Impacted Files Coverage Δ
src/OpenTelemetry/Metrics/MeterProviderSdk.cs 89.50% <100.00%> (ø)
...lemetry/Internal/SelfDiagnosticsConfigRefresher.cs 86.53% <0.00%> (-1.93%) ⬇️
...nTelemetry/Internal/OpenTelemetrySdkEventSource.cs 74.13% <0.00%> (-1.73%) ⬇️
...entation.AspNet/TracerProviderBuilderExtensions.cs 100.00% <0.00%> (ø)
...rumentation.AspNet/AspNetInstrumentationOptions.cs 100.00% <0.00%> (ø)
...Implementation/AspNetInstrumentationEventSource.cs 76.92% <0.00%> (ø)
...ry.Instrumentation.AspNet/AspNetInstrumentation.cs 100.00% <0.00%> (ø)
...nTelemetry.Instrumentation.AspNet/AspNetMetrics.cs 100.00% <0.00%> (ø)
...mentation.AspNet/MeterProviderBuilderExtensions.cs 100.00% <0.00%> (ø)
...ion.AspNet/Implementation/HttpInMetricsListener.cs 100.00% <0.00%> (ø)
... and 6 more

@cijothomas cijothomas merged commit eb8844a into open-telemetry:main May 18, 2022
@alanwest alanwest deleted the alanwest/fix-null-ref branch September 30, 2022 22:07
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.

AddView - Returning null results in a NullReferenceException
3 participants