Skip to content

[Instrumentation.EntityFrameworkCore] Database metrics #2707

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

matt-hensley
Copy link
Contributor

@matt-hensley matt-hensley commented Apr 21, 2025

Changes

Ports database metrics from SqlClient to EF Core.

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)

start attr extract

more extraction

cleanup

use new methods

activityName
record duration

readability

verify helper

ShouldNotCollectMetrics test
@github-actions github-actions bot added the comp:instrumentation.entityframeworkcore Things related to OpenTelemetry.Instrumentation.EntityFrameworkCore label Apr 21, 2025
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 79.87013% with 31 lines in your changes missing coverage. Please review.

Project coverage is 74.90%. Comparing base (71655ce) to head (e995df3).
Report is 815 commits behind head on main.

Files with missing lines Patch % Lines
...mplementation/EntityFrameworkDiagnosticListener.cs 75.20% 31 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2707      +/-   ##
==========================================
+ Coverage   73.91%   74.90%   +0.99%     
==========================================
  Files         267        6     -261     
  Lines        9615      275    -9340     
==========================================
- Hits         7107      206    -6901     
+ Misses       2508       69    -2439     
Flag Coverage Δ
unittests-Instrumentation.EntityFrameworkCore 74.90% <79.87%> (?)

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

Files with missing lines Coverage Δ
...tityFrameworkCoreMeterProviderBuilderExtensions.cs 100.00% <100.00%> (ø)
...ityFrameworkCore/EntityFrameworkInstrumentation.cs 92.85% <100.00%> (-7.15%) ⬇️
...tyFrameworkCore/TracerProviderBuilderExtensions.cs 100.00% <100.00%> (ø)
...mplementation/EntityFrameworkDiagnosticListener.cs 74.21% <75.20%> (+21.82%) ⬆️

... and 258 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 Apr 30, 2025
@alanwest alanwest removed the Stale label May 2, 2025
@matt-hensley
Copy link
Contributor Author

Stable metrics have been released by the db convention WG. ORM metrics and a strategy combining database driver and ORM metrics has not been defined yet.

Need to determine an appropriate opt-in mechanism for ORM metrics.

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

Successfully merging this pull request may close these issues.

2 participants