Skip to content

Commit 58d5e8e

Browse files
authored
Merge branch 'main' into cijothomas/metric-shutdown
2 parents 32035cb + 732b938 commit 58d5e8e

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
@@ -122,7 +122,7 @@ impl HasHttpConfig for MetricExporterBuilder<HttpExporterBuilderSet> {
122122

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

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

0 commit comments

Comments
 (0)