Skip to content

Conversation

@joonas
Copy link
Contributor

@joonas joonas commented May 23, 2025

Changes

According to the WithExporterConfig docs, passing an empty string towith_endpoint should result in the default endpoint being used, however that's not currently what happens.

This change adds an additional check to make sure that the provided endpoint is not an empty string, and if it is, then it'll fall back to using the default endpoint instead.

As an aside, I considered changing the WithExportConfig implementation of with_endpoint to do this check, and if that's the preferred route to go, I'm happy to switch these changes over to there instead.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@joonas joonas requested a review from a team as a code owner May 23, 2025 16:47
@codecov
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.9%. Comparing base (6279060) to head (8c35a95).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3000   +/-   ##
=====================================
  Coverage   80.9%   80.9%           
=====================================
  Files        126     126           
  Lines      24787   24803   +16     
=====================================
+ Hits       20068   20088   +20     
+ Misses      4719    4715    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copy link
Contributor

@bantonsson bantonsson left a comment

Choose a reason for hiding this comment

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

Thanks. I think it makes sense to check at resolution time.

@cijothomas cijothomas merged commit cab5565 into open-telemetry:main May 30, 2025
27 checks passed
@joonas joonas deleted the fix/use-default-endpoint-for-empty-string branch May 30, 2025 15:31
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.

3 participants