diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 596861923dcd..2a930c1ca559 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -88,10 +88,10 @@ - - - - + + + + diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs index 548a335eef07..c1ef40071b0d 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/api/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.netstandard2.0.cs @@ -11,10 +11,10 @@ public AzureMonitorExporterOptions() { } public long MaxTransmissionStorageCapacity { get { throw null; } set { } } public string StorageFolder { get { throw null; } set { } } } - public partial class AzureMonitorTraceExporter : OpenTelemetry.Trace.ActivityExporter + public partial class AzureMonitorTraceExporter : OpenTelemetry.BaseExporter { public AzureMonitorTraceExporter(Microsoft.Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions options) { } - public override OpenTelemetry.Trace.ExportResult Export(in OpenTelemetry.Batch batch) { throw null; } + public override OpenTelemetry.ExportResult Export(in OpenTelemetry.Batch batch) { throw null; } } } namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs index c45bac4b6bd8..c0150305e2ff 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorExporterHelperExtensions.cs @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using OpenTelemetry; using OpenTelemetry.Trace; using System; +using System.Diagnostics; namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { @@ -28,7 +30,7 @@ public static TracerProviderBuilder AddAzureMonitorTraceExporter(this TracerProv configure?.Invoke(options); // TODO: Pick Simple vs Batching based on AzureMonitorExporterOptions - return builder.AddProcessor(new BatchExportActivityProcessor(new AzureMonitorTraceExporter(options))); + return builder.AddProcessor(new BatchExportProcessor(new AzureMonitorTraceExporter(options))); } } } diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs index 95d1eda8a3c4..e50341952cee 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorTraceExporter.cs @@ -12,7 +12,7 @@ namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter { - public class AzureMonitorTraceExporter : ActivityExporter + public class AzureMonitorTraceExporter : BaseExporter { private readonly ITransmitter Transmitter; private readonly AzureMonitorExporterOptions options; diff --git a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs index f23bbd0064d0..9d22ddf7e5eb 100644 --- a/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs +++ b/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests/TestFramework/OpenTelemetryWebApplicationFactory.cs @@ -9,6 +9,8 @@ using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models; using OpenTelemetry.Trace; +using OpenTelemetry; +using System.Diagnostics; namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.TestFramework { @@ -24,11 +26,11 @@ public class OpenTelemetryWebApplicationFactory : WebApplicationFactor private const string EmptyConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000"; private readonly MockTransmitter Transmitter = new MockTransmitter(); - private ActivityProcessor ActivityProcessor; + private BaseProcessor ActivityProcessor; protected override void ConfigureWebHost(IWebHostBuilder builder) { - this.ActivityProcessor = new BatchExportActivityProcessor(new AzureMonitorTraceExporter( + this.ActivityProcessor = new BatchExportProcessor(new AzureMonitorTraceExporter( options: new AzureMonitorExporterOptions { ConnectionString = EmptyConnectionString,