Skip to content
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

OTLP Exporter builder to return more specific Error type #2654

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

cijothomas
Copy link
Member

Fixes #2561

Also removes now unused Error enum from Log SDK. Another set of cleanup required to clean Metrics, Traces completely.
Also, the newly introduced enum ExporterBuildError is not fully refined, this can be done in follow ups.

Note: This is a breaking change for OTLP Exporter, however, the impact is minimal (most users/examples simply unwrap/expect the Result instead of matching on it.), as described in the changelog, so I propose to make the change even though OTLP Exporter is marked RC.

@cijothomas cijothomas requested a review from a team as a code owner February 12, 2025 20:28
@cijothomas
Copy link
Member Author

@scottgerring @lalitb #2571 principles are followed, please review.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 21.27660% with 37 lines in your changes missing coverage. Please review.

Project coverage is 79.2%. Comparing base (1aca212) to head (7019656).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-otlp/src/exporter/http/mod.rs 33.3% 18 Missing ⚠️
opentelemetry-otlp/src/exporter/tonic/mod.rs 9.0% 10 Missing ⚠️
opentelemetry-otlp/src/exporter/mod.rs 0.0% 3 Missing ⚠️
opentelemetry-otlp/src/logs.rs 0.0% 2 Missing ⚠️
opentelemetry-otlp/src/metric.rs 0.0% 2 Missing ⚠️
opentelemetry-otlp/src/span.rs 0.0% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2654   +/-   ##
=====================================
  Coverage   79.1%   79.2%           
=====================================
  Files        120     119    -1     
  Lines      22556   22553    -3     
=====================================
+ Hits       17857   17864    +7     
+ Misses      4699    4689   -10     

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

@@ -92,6 +93,42 @@ impl Default for ExportConfig {
}
}

#[derive(Error, Debug)]
/// Errors that can occur while building an exporter.
// TODO: Refine and polish this.
Copy link
Contributor

Choose a reason for hiding this comment

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

😇

Suggested change
// TODO: Refine and polish this.

Copy link
Contributor

@scottgerring scottgerring left a comment

Choose a reason for hiding this comment

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

Cool! couple of minor comments inline

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.

Should OTLP Exporter Error enum be public and visible to the processor?
6 participants