Skip to content

[WCF] Avoid creating activity - #5124

Open
martincostello wants to merge 1 commit into
open-telemetry:mainfrom
martincostello:wcf-avoid-activity-creation
Open

[WCF] Avoid creating activity#5124
martincostello wants to merge 1 commit into
open-telemetry:mainfrom
martincostello:wcf-avoid-activity-creation

Conversation

@martincostello

Copy link
Copy Markdown
Member

Changes

Avoid creating an activity and associated tags if there are no trace listeners configured for the activity source.

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)

Avoid creating an activity and associated tags if there are no trace listeners configured for the activity source.
@martincostello
martincostello requested a balanced review from Copilot August 25, 2026 16:19
@github-actions github-actions Bot added the comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf label Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.18%. Comparing base (d074a71) to head (4651661).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5124   +/-   ##
=======================================
  Coverage   78.18%   78.18%           
=======================================
  Files         484      484           
  Lines       20555    20559    +4     
=======================================
+ Hits        16071    16075    +4     
  Misses       4484     4484           
Flag Coverage Δ
unittests-Instrumentation.Wcf 82.72% <100.00%> (+0.08%) ⬆️

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

Files with missing lines Coverage Δ
...Wcf/Implementation/ClientChannelInstrumentation.cs 88.88% <100.00%> (+0.20%) ⬆️
...mplementation/TelemetryDispatchMessageInspector.cs 93.20% <100.00%> (+0.13%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Optimizes WCF tracing by skipping activity tag construction when the selected activity source has no listeners.

Changes:

  • Adds listener checks for incoming server requests.
  • Adds listener checks for outgoing client requests.

Reviewed changes

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

File Description
TelemetryDispatchMessageInspector.cs Adds the incoming-request fast path.
ClientChannelInstrumentation.cs Adds the outgoing-request fast path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@martincostello
martincostello marked this pull request as ready for review August 25, 2026 16:21
@martincostello
martincostello requested a review from a team as a code owner August 25, 2026 16:21
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 25, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-08-26 19:56 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants