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 aspnet metric example #3033

Conversation

vishweshbankwar
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #3033 (7a13bd3) into main (3af5a3b) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3033      +/-   ##
==========================================
+ Coverage   84.70%   84.72%   +0.02%     
==========================================
  Files         258      258              
  Lines        9095     9095              
==========================================
+ Hits         7704     7706       +2     
+ Misses       1391     1389       -2     
Impacted Files Coverage Δ
...tation/OpenTelemetryProtocolExporterEventSource.cs 85.00% <0.00%> (+10.00%) ⬆️

@vishweshbankwar vishweshbankwar marked this pull request as ready for review March 11, 2022 22:30
@vishweshbankwar vishweshbankwar requested a review from a team March 11, 2022 22:30
exporterOptions.Targets = ConsoleExporterOutputTargets.Debug;

// The ConsoleMetricExporter defaults to a manual collect cycle.
// This configuration causes metrics to be exported to stdout on a 10s interval.
Copy link
Member

Choose a reason for hiding this comment

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

Given #2982 is merged, we can simplify the code here?

Copy link
Member

Choose a reason for hiding this comment

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

FYI @alanwest, IIRC you plan to remove the MetricReaderType entirely?


var meterBuilder = Sdk.CreateMeterProviderBuilder()
.AddAspNetInstrumentation()
.AddHttpClientInstrumentation();
Copy link
Member

Choose a reason for hiding this comment

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

HttpClient for .NET FW don't produce metrics as of today, so its best to remove this line to avoid confusion. We can add it when httpclient starts having some metrics.

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.

3 participants