Skip to content

Commit

Permalink
Removed unnecessary public methods from OTLP Exporter (#2575)
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas authored Jan 30, 2025
1 parent 8520610 commit 732b938
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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 @@ impl HasHttpConfig for MetricExporterBuilder<HttpExporterBuilderSet> {

/// 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 @@ impl MetricExporter {
}

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

0 comments on commit 732b938

Please sign in to comment.