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

[Instrumentation.EventCounters] DI support for configuring #2078

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ysolomchenko
Copy link
Contributor

@ysolomchenko ysolomchenko commented Sep 17, 2024

Fixes #833

Changes

Event counters instrumentation can be enabled when using DI

New environment variables introduced for further customization:

  • OTEL_DOTNET_EVENTCOUNTERS_REFRESH_INTERVAL_SECS: Specifies the refresh interval.
  • OTEL_DOTNET_EVENTCOUNTERS_SOURCES: Defines the sources.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@github-actions github-actions bot added the comp:instrumentation.eventcounters Things related to OpenTelemetry.Instrumentation.EventCounters label Sep 17, 2024
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 12 lines in your changes missing coverage. Please review.

Project coverage is 72.97%. Comparing base (71655ce) to head (fd994e9).
Report is 586 commits behind head on main.

Files with missing lines Patch % Lines
...entCounters/EventCountersInstrumentationOptions.cs 66.66% 7 Missing ⚠️
...ounters/EventCountersInstrumentationEventSource.cs 0.00% 4 Missing ⚠️
...on.EventCounters/MeterProviderBuilderExtensions.cs 95.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2078      +/-   ##
==========================================
- Coverage   73.91%   72.97%   -0.95%     
==========================================
  Files         267      359      +92     
  Lines        9615    13826    +4211     
==========================================
+ Hits         7107    10089    +2982     
- Misses       2508     3737    +1229     
Flag Coverage Δ
unittests-Contrib.Shared.Tests 83.17% <ø> (?)
unittests-Exporter.Geneva 62.69% <ø> (?)
unittests-Exporter.InfluxDB 95.88% <ø> (?)
unittests-Exporter.Instana 71.24% <ø> (?)
unittests-Exporter.OneCollector 94.34% <ø> (?)
unittests-Exporter.Stackdriver 75.73% <ø> (?)
unittests-Extensions 88.63% <ø> (?)
unittests-Extensions.Enrichment 100.00% <ø> (?)
unittests-Instrumentation.AWS 85.98% <ø> (?)
unittests-Instrumentation.AspNet 76.73% <ø> (?)
unittests-Instrumentation.AspNetCore 70.06% <ø> (?)
unittests-Instrumentation.ConfluentKafka 14.12% <ø> (?)
unittests-Instrumentation.ElasticsearchClient 79.87% <ø> (?)
unittests-Instrumentation.EntityFrameworkCore 57.06% <ø> (?)
unittests-Instrumentation.EventCounters 75.00% <73.33%> (?)
unittests-Instrumentation.GrpcNetClient 79.61% <ø> (?)
unittests-Instrumentation.Hangfire 93.58% <ø> (?)
unittests-Instrumentation.Http 73.57% <ø> (?)
unittests-Instrumentation.Owin 85.97% <ø> (?)
unittests-Instrumentation.Process 100.00% <ø> (?)
unittests-Instrumentation.Quartz 78.94% <ø> (?)
unittests-Instrumentation.Runtime 97.53% <ø> (?)
unittests-Instrumentation.SqlClient 91.36% <ø> (?)
unittests-Instrumentation.StackExchangeRedis 69.92% <ø> (?)
unittests-Instrumentation.Wcf 78.47% <ø> (?)
unittests-PersistentStorage 65.78% <ø> (?)
unittests-Resources.AWS 77.85% <ø> (?)
unittests-Resources.Azure 83.89% <ø> (?)
unittests-Resources.Container 72.41% <ø> (?)
unittests-Resources.Gcp 72.54% <ø> (?)
unittests-Resources.Host 73.94% <ø> (?)
unittests-Resources.OperatingSystem 77.20% <ø> (?)
unittests-Resources.Process 100.00% <ø> (?)
unittests-Resources.ProcessRuntime 77.08% <ø> (?)
unittests-Sampler.AWS 87.74% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...on.EventCounters/MeterProviderBuilderExtensions.cs 95.65% <95.00%> (-4.35%) ⬇️
...ounters/EventCountersInstrumentationEventSource.cs 6.66% <0.00%> (-2.43%) ⬇️
...entCounters/EventCountersInstrumentationOptions.cs 74.07% <66.66%> (-25.93%) ⬇️

... and 375 files with indirect coverage changes

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 27, 2024
@github-actions github-actions bot removed the Stale label Oct 4, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 12, 2024
@ysolomchenko ysolomchenko marked this pull request as ready for review October 14, 2024 12:42
@ysolomchenko ysolomchenko requested a review from a team as a code owner October 14, 2024 12:42
@ysolomchenko
Copy link
Contributor Author

@CodeBlanch Could you review this PR?

@github-actions github-actions bot removed the Stale label Oct 15, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 23, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.eventcounters Things related to OpenTelemetry.Instrumentation.EventCounters Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DI support for configuring EventCounters
4 participants