Skip to content

Conversation

@martincostello
Copy link
Member

Fixes #3078

Changes

Make the new SetDbQueryParameters property internal and gate behind an environment variable instead.

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)

Make the new `SetDbQueryParameters` property internal and gate behind an environment variable instead.
Copilot AI review requested due to automatic review settings September 8, 2025 09:41
@martincostello martincostello requested a review from a team as a code owner September 8, 2025 09:41
@github-actions github-actions bot added comp:instrumentation.entityframeworkcore Things related to OpenTelemetry.Instrumentation.EntityFrameworkCore comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient labels Sep 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes the SetDbQueryParameters property internal and configures it through environment variables instead of exposing it as a public API. The change affects both SqlClient and EntityFrameworkCore instrumentation libraries.

Key changes:

  • Made SetDbQueryParameters property internal instead of public
  • Added environment variable configuration for both libraries
  • Updated documentation to remove public API usage examples

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
SqlClientTraceInstrumentationOptions.cs Made SetDbQueryParameters internal and added environment variable configuration
EntityFrameworkInstrumentationOptions.cs Made SetDbQueryParameters internal and added environment variable configuration
SqlClient README.md Removed public API documentation section
EntityFrameworkCore README.md Removed public API documentation section
Test files Added tests for environment variable configuration
PublicAPI.Unshipped.txt Removed public API entries
CHANGELOG.md Updated to reference environment variable instead of public option

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.87%. Comparing base (c8c60c4) to head (ad04bce).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3081      +/-   ##
==========================================
+ Coverage   69.74%   69.87%   +0.12%     
==========================================
  Files         410      410              
  Lines       16264    16239      -25     
==========================================
+ Hits        11344    11347       +3     
+ Misses       4920     4892      -28     
Flag Coverage Δ
unittests-Instrumentation.EntityFrameworkCore 80.80% <100.00%> (+0.23%) ⬆️
unittests-Instrumentation.SqlClient 87.29% <100.00%> (+0.61%) ⬆️

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

Files with missing lines Coverage Δ
...eworkCore/EntityFrameworkInstrumentationOptions.cs 100.00% <100.00%> (ø)
....SqlClient/SqlClientTraceInstrumentationOptions.cs 100.00% <100.00%> (ø)

... and 8 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.

Add link to this PR too.

Co-authored-by: Piotr Kiełkowicz <[email protected]>
Restore the original README content for `SetDbQueryParameters` under a new Experimental features heading.
Be consistent with the other notes.
This was referenced Oct 27, 2025
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 comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DbQueryParamter enabled only by env. var. as it is still in development phase

3 participants