Skip to content

otelconf: add tests for grpc exporters with different certificate configurations #7233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
May 14, 2025

Conversation

bacherfl
Copy link
Contributor

This PR adds component tests for the otlp grpc exporters for logs/metrics/traces. The tests work by starting a simple grpc server that implements the Export interface of the respective signals, and records what is being sent to it. This should server as a way to verify that the otlp exporters created within this package are able to communicate with the server.

Closes #7222

@github-actions github-actions bot requested review from codeboten and pellared April 16, 2025 09:56
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.1%. Comparing base (23d3857) to head (8d398c8).
Report is 19 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #7233     +/-   ##
=======================================
+ Coverage   81.0%   81.1%   +0.1%     
=======================================
  Files        204     204             
  Lines      18080   18148     +68     
=======================================
+ Hits       14651   14729     +78     
+ Misses      3003    3000      -3     
+ Partials     426     419      -7     

see 10 files with indirect coverage changes

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

@bacherfl bacherfl marked this pull request as ready for review April 22, 2025 09:17
@bacherfl bacherfl requested a review from a team as a code owner April 22, 2025 09:17
@bacherfl
Copy link
Contributor Author

@pellared this should be ready for review now - I'm not sure if a changelog entry is needed as this PR only adds tests.
The failing lint check seems to affect files that are not part of this PR, here I'm not sure how to address that

@pellared pellared added the Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG label Apr 22, 2025
@pellared
Copy link
Member

The failing lint check seems to affect files that are not part of this PR, here I'm not sure how to address that

From build failure

Working tree is not clean, did you forget to run "make precommit"?

Guessing that go mod tidy run is missing as modified: otelconf/go.mod 😉

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.

n, err := net.Listen("tcp", "localhost:0")
require.NoError(t, err)

// this is a workaround, as providing 127.0.0.1 resulted in an "invalid URI for request" error
Copy link
Member

Choose a reason for hiding this comment

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

Can you please create an issue for the bug it and reference it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, will do that today

@dmathieu
Copy link
Member

Can you fix the CI?

@bacherfl
Copy link
Contributor Author

Can you fix the CI?

fixed

@dmathieu dmathieu merged commit 9433078 into open-telemetry:main May 14, 2025
25 checks passed
@MrAlias MrAlias added this to the v1.36.0 milestone May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

otelconf: Increase test coverage for OTLP-related code
4 participants