Skip to content

Conversation

@KonstantinosTsitoumis
Copy link

makes defaultClient private and creates a function that initialises it only once.

created for issue: #8131

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 6, 2025

CLA Signed

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.8%. Comparing base (79904a3) to head (3b4d67d).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #8140   +/-   ##
=====================================
  Coverage   81.8%   81.8%           
=====================================
  Files        194     194           
  Lines      13362   13362           
=====================================
  Hits       10931   10931           
  Misses      2033    2033           
  Partials     398     398           
Files with missing lines Coverage Δ
instrumentation/net/http/otelhttp/client.go 66.6% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KonstantinosTsitoumis KonstantinosTsitoumis force-pushed the main branch 4 times, most recently from 1589ed8 to 0c5a22d Compare November 6, 2025 23:56
@flc1125
Copy link
Member

flc1125 commented Nov 7, 2025

As mentioned in: #8131 (comment), we need to first mark it as deprecated before proceeding with the replacement. We need to give users a transition period.

I suggest that you discuss and confirm the specific details of the deprecation and replacement plan on the issue page so that we can proceed with the follow-up work.

PS: This issue is expected to be split into multiple phases for implementation.

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

From #8131 (comment):

I propose deprecating and later removing

Also #8140 (comment)

@KonstantinosTsitoumis KonstantinosTsitoumis changed the title otelhttp: make DefaultClient immutable otelhttp: Deprecate DefaultClient Nov 7, 2025
Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

Please take a look at other "deprecation" PRs for reference such as #8117

"strings"
)

// Deprecated: This will be deleted in the future.
Copy link
Member

Choose a reason for hiding this comment

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

Please document what the user should do instead.

Choose a reason for hiding this comment

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

I'm not sure what user needs to do next, I assumed that since we are going to delete this they need to initialise a client on theirselves.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants