From 82453d7a41917840871cf3782c2631e9798fd6a8 Mon Sep 17 00:00:00 2001 From: Bryce Buchanan Date: Fri, 25 Oct 2024 14:31:51 -0700 Subject: [PATCH] added deprecation messages to exporters as well. --- .../OpenTelemetryProtocolGrpc/metric/OtlpMetricExporter.swift | 1 + .../metric/OltpHTTPMetricExporter.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/Exporters/OpenTelemetryProtocolGrpc/metric/OtlpMetricExporter.swift b/Sources/Exporters/OpenTelemetryProtocolGrpc/metric/OtlpMetricExporter.swift index 51188c0c..0c951092 100644 --- a/Sources/Exporters/OpenTelemetryProtocolGrpc/metric/OtlpMetricExporter.swift +++ b/Sources/Exporters/OpenTelemetryProtocolGrpc/metric/OtlpMetricExporter.swift @@ -12,6 +12,7 @@ import OpenTelemetryApi import OpenTelemetryProtocolExporterCommon import OpenTelemetrySdk +@available(*, deprecated, renamed: "StableOtlpMetricExporter") public class OtlpMetricExporter: MetricExporter { let channel: GRPCChannel var metricClient: Opentelemetry_Proto_Collector_Metrics_V1_MetricsServiceNIOClient diff --git a/Sources/Exporters/OpenTelemetryProtocolHttp/metric/OltpHTTPMetricExporter.swift b/Sources/Exporters/OpenTelemetryProtocolHttp/metric/OltpHTTPMetricExporter.swift index 25f5b2fd..54c816d7 100644 --- a/Sources/Exporters/OpenTelemetryProtocolHttp/metric/OltpHTTPMetricExporter.swift +++ b/Sources/Exporters/OpenTelemetryProtocolHttp/metric/OltpHTTPMetricExporter.swift @@ -14,6 +14,7 @@ public func defaultOltpHTTPMetricsEndpoint() -> URL { URL(string: "http://localhost:4318/v1/metrics")! } +@available(*, deprecated, renamed: "StableOtlpHTTPMetricExporter") public class OtlpHttpMetricExporter: OtlpHttpExporterBase, MetricExporter { var pendingMetrics: [Metric] = [] private let exporterLock = Lock()