opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[chore] move from DialContext to NewClient

Open sivchari opened this issue 3 months ago • 7 comments
trafficstars

Description

Use grpc.NewClient instead of grpc.DialContext

Link to tracking issue

Fixes #13632

Testing

Documentation

sivchari avatar Aug 19 '25 02:08 sivchari

Codecov Report

:x: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 92.21%. Comparing base (a9691ee) to head (1a41d56).

Files with missing lines Patch % Lines
config/configgrpc/configgrpc.go 60.00% 1 Missing and 1 partial :warning:

:x: Your patch check has failed because the patch coverage (60.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13663      +/-   ##
==========================================
- Coverage   92.24%   92.21%   -0.04%     
==========================================
  Files         658      658              
  Lines       41168    41172       +4     
==========================================
- Hits        37977    37968       -9     
- Misses       2184     2192       +8     
- Partials     1007     1012       +5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Aug 19 '25 03:08 codecov[bot]

I suspect the contrib test failures are due to the fact that NewClient doesn't initiate a connection unlike DialContext, we should be able to fix that somewhat easily.

@sivchari Can you confirm that this doesn't reintroduce https://github.com/open-telemetry/opentelemetry-collector/issues/11537? If possible, a basic test would be nice.

evan-bradley avatar Aug 19 '25 13:08 evan-bradley

Sorry for late, I added the condition to check whether the connection is established correctly

sivchari avatar Sep 02 '25 08:09 sivchari

Were you able to explicitly confirm that the issue in https://github.com/open-telemetry/opentelemetry-collector/issues/11537 isn't reintroduced here?

dmathieu avatar Sep 02 '25 12:09 dmathieu

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Sep 17 '25 03:09 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Oct 10 '25 03:10 github-actions[bot]

I'm marking this as "ready to merge" based on the number of approvals. My comment about removing the test for go-grpc behavior is not a blocker.

dmathieu avatar Oct 28 '25 08:10 dmathieu

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Nov 12 '25 03:11 github-actions[bot]