Skip to content

Removed unnecessary public methods from OTLP Exporter #2575

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions opentelemetry-otlp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"reqwest-blocking-client" features as default, to align with the
specification.
[2516](https://github.com/open-telemetry/opentelemetry-rust/pull/2516)
- Remove unnecessarily public trait `opentelemetry_otlp::metrics::MetricsClient`
and `MetricExporter::new(..)` method. Use
`MetricExporter::builder()...build()` to obtain `MetricExporter`.

## 0.27.0

Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-otlp/src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@

/// An interface for OTLP metrics clients
#[async_trait]
pub trait MetricsClient: fmt::Debug + Send + Sync + 'static {
pub(crate) trait MetricsClient: fmt::Debug + Send + Sync + 'static {
async fn export(&self, metrics: &mut ResourceMetrics) -> MetricResult<()>;
fn shutdown(&self) -> MetricResult<()>;
}
Expand Down Expand Up @@ -165,7 +165,7 @@
}

/// Create a new metrics exporter
pub fn new(client: impl MetricsClient, temporality: Temporality) -> MetricExporter {
pub(crate) fn new(client: impl MetricsClient, temporality: Temporality) -> MetricExporter {

Check warning on line 168 in opentelemetry-otlp/src/metric.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-otlp/src/metric.rs#L168

Added line #L168 was not covered by tests
MetricExporter {
client: Box::new(client),
temporality,
Expand Down