Skip to content

Remove duplicate global propagator setup in gRPC client example - #4654

Merged
marcalff merged 3 commits into
open-telemetry:mainfrom
SyaoranY:fix-grpc-example-duplicate-propagator-setup
Oct 2, 2026
Merged

marcalff merged 3 commits into
open-telemetry:mainfrom
SyaoranY:fix-grpc-example-duplicate-propagator-setup

Conversation

@SyaoranY

@SyaoranY SyaoranY commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #4652

Changes

This PR removes the duplicate GlobalTextMapPropagator::SetGlobalPropagator() call from examples/grpc/client.cc.

The global HttpTraceContext propagator is already configured in InitTracer(), so the second setup in main() is redundant and may confuse users reading the example.

I tested the example after removing the duplicate call and observed no change in behavior.

No functional behavior is intended to change.

@SyaoranY
SyaoranY requested a review from a team as a code owner October 1, 2026 00:18
@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.70%. Comparing base (e4232d8) to head (40eb226).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4654   +/-   ##
=======================================
  Coverage   86.70%   86.70%           
=======================================
  Files         525      525           
  Lines       20596    20596           
=======================================
  Hits        17856    17856           
  Misses       2740     2740           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lalitb lalitb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks.

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

@marcalff
marcalff merged commit e51997b into open-telemetry:main Oct 2, 2026
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate global propagator setup in gRPC client example

4 participants