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.SqlClient] Implements database metric db.client.operation.duration #2309

Merged
merged 14 commits into from
Nov 8, 2024

Conversation

matt-hensley
Copy link
Contributor

Fixes #
Design discussion issue #

Changes

Implements proposed db.client.operation.duration metric for SqlClient with required attributes.

Only implemented against .NET 6+ for now.

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)

@matt-hensley matt-hensley requested a review from a team as a code owner November 8, 2024 16:53
@github-actions github-actions bot added the comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient label Nov 8, 2024
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 92.59259% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.02%. Comparing base (71655ce) to head (fdf77fe).
Report is 588 commits behind head on main.

Files with missing lines Patch % Lines
...ient/Implementation/SqlClientDiagnosticListener.cs 90.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2309       +/-   ##
===========================================
+ Coverage   73.91%   89.02%   +15.10%     
===========================================
  Files         267        9      -258     
  Lines        9615      410     -9205     
===========================================
- Hits         7107      365     -6742     
+ Misses       2508       45     -2463     
Flag Coverage Δ
unittests-Instrumentation.SqlClient 89.02% <92.59%> (?)

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

Files with missing lines Coverage Δ
...qlClient/Implementation/SqlActivitySourceHelper.cs 100.00% <100.00%> (ø)
...trumentation.SqlClient/SqlClientInstrumentation.cs 92.68% <100.00%> (ø)
...lClient/SqlClientMeterProviderBuilderExtensions.cs 100.00% <100.00%> (ø)
...ient/Implementation/SqlClientDiagnosticListener.cs 90.34% <90.00%> (ø)

... and 269 files with indirect coverage changes

@matt-hensley matt-hensley requested a review from alanwest November 8, 2024 20:04
@alanwest alanwest merged commit 01532d4 into open-telemetry:main Nov 8, 2024
56 checks passed
@alanwest
Copy link
Member

alanwest commented Nov 8, 2024

I merged this PR prematurely without a changelog. Spoke with @matt-hensley, he's working on making metrics work for .NET Framework in a follow on PR. Changelog will be updated there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants