Skip to content

Commit 732b938

Browse files
authored
Removed unnecessary public methods from OTLP Exporter (#2575)
1 parent 8520610 commit 732b938

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

opentelemetry-otlp/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"reqwest-blocking-client" features as default, to align with the
1111
specification.
1212
[2516](https://github.com/open-telemetry/opentelemetry-rust/pull/2516)
13+
- Remove unnecessarily public trait `opentelemetry_otlp::metrics::MetricsClient`
14+
and `MetricExporter::new(..)` method. Use
15+
`MetricExporter::builder()...build()` to obtain `MetricExporter`.
1316

1417
## 0.27.0
1518

opentelemetry-otlp/src/metric.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl HasHttpConfig for MetricExporterBuilder<HttpExporterBuilderSet> {
121121

122122
/// An interface for OTLP metrics clients
123123
#[async_trait]
124-
pub trait MetricsClient: fmt::Debug + Send + Sync + 'static {
124+
pub(crate) trait MetricsClient: fmt::Debug + Send + Sync + 'static {
125125
async fn export(&self, metrics: &mut ResourceMetrics) -> MetricResult<()>;
126126
fn shutdown(&self) -> MetricResult<()>;
127127
}
@@ -165,7 +165,7 @@ impl MetricExporter {
165165
}
166166

167167
/// Create a new metrics exporter
168-
pub fn new(client: impl MetricsClient, temporality: Temporality) -> MetricExporter {
168+
pub(crate) fn new(client: impl MetricsClient, temporality: Temporality) -> MetricExporter {
169169
MetricExporter {
170170
client: Box::new(client),
171171
temporality,

0 commit comments

Comments
 (0)