diff --git a/examples/AspNetCore/Startup.cs b/examples/AspNetCore/Startup.cs index 9711826df8e..7a0e7876643 100644 --- a/examples/AspNetCore/Startup.cs +++ b/examples/AspNetCore/Startup.cs @@ -75,7 +75,6 @@ public void ConfigureServices(IServiceCollection services) .AddHttpClientInstrumentation() .AddZipkinExporter(zipkinOptions => { - zipkinOptions.ServiceName = this.Configuration.GetValue("Zipkin:ServiceName"); zipkinOptions.Endpoint = new Uri(this.Configuration.GetValue("Zipkin:Endpoint")); })); break; diff --git a/examples/Console/TestRedis.cs b/examples/Console/TestRedis.cs index 068f95bf1c4..745b077043c 100644 --- a/examples/Console/TestRedis.cs +++ b/examples/Console/TestRedis.cs @@ -45,7 +45,6 @@ internal static object Run(string zipkinUri) using var openTelemetry = Sdk.CreateTracerProviderBuilder() .AddZipkinExporter(o => { - o.ServiceName = "redis-test"; o.Endpoint = new Uri(zipkinUri); }) .AddRedisInstrumentation(connection, options => diff --git a/examples/Console/TestZipkinExporter.cs b/examples/Console/TestZipkinExporter.cs index d5e8f1617c0..25c63c07104 100644 --- a/examples/Console/TestZipkinExporter.cs +++ b/examples/Console/TestZipkinExporter.cs @@ -40,7 +40,6 @@ internal static object Run(string zipkinUri) .AddSource("Samples.SampleClient", "Samples.SampleServer") .AddZipkinExporter(o => { - o.ServiceName = "test-zipkin"; o.Endpoint = new Uri(zipkinUri); }) .Build(); diff --git a/examples/GrpcService/Startup.cs b/examples/GrpcService/Startup.cs index 40eb2e1bde1..427c665841e 100644 --- a/examples/GrpcService/Startup.cs +++ b/examples/GrpcService/Startup.cs @@ -59,7 +59,6 @@ public void ConfigureServices(IServiceCollection services) .AddAspNetCoreInstrumentation() .AddZipkinExporter(zipkinOptions => { - zipkinOptions.ServiceName = this.Configuration.GetValue("Zipkin:ServiceName"); zipkinOptions.Endpoint = new Uri(this.Configuration.GetValue("Zipkin:Endpoint")); })); break; diff --git a/examples/MicroserviceExample/WebApi/Startup.cs b/examples/MicroserviceExample/WebApi/Startup.cs index e1b9ef775d6..a7664f00ccf 100644 --- a/examples/MicroserviceExample/WebApi/Startup.cs +++ b/examples/MicroserviceExample/WebApi/Startup.cs @@ -46,7 +46,6 @@ public void ConfigureServices(IServiceCollection services) .AddZipkinExporter(b => { var zipkinHostName = Environment.GetEnvironmentVariable("ZIPKIN_HOSTNAME") ?? "localhost"; - b.ServiceName = nameof(WebApi); b.Endpoint = new Uri($"http://{zipkinHostName}:9411/api/v2/spans"); })); } diff --git a/examples/MicroserviceExample/WorkerService/Program.cs b/examples/MicroserviceExample/WorkerService/Program.cs index a891b6f8b49..d037e727cfb 100644 --- a/examples/MicroserviceExample/WorkerService/Program.cs +++ b/examples/MicroserviceExample/WorkerService/Program.cs @@ -44,7 +44,6 @@ public static IHostBuilder CreateHostBuilder(string[] args) => .AddZipkinExporter(b => { var zipkinHostName = Environment.GetEnvironmentVariable("ZIPKIN_HOSTNAME") ?? "localhost"; - b.ServiceName = nameof(WorkerService); b.Endpoint = new Uri($"http://{zipkinHostName}:9411/api/v2/spans"); }); }); diff --git a/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md b/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md index 322a954ee16..c0f775e4fe1 100644 --- a/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md @@ -5,6 +5,9 @@ * Moved `JaegerExporter` and `JaegerExporterOptions` classes to `OpenTelemetry.Exporter` namespace. ([#1770](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1770)) +* Default `service.name` complies with OTel spec. Grabs default from + `ParentProvider` using GetDefaultResource() APIfrom SDK if not found. + [#1768](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1768) ## 1.0.0-rc2 diff --git a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs index bf37196ac37..3ccd556e592 100644 --- a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs +++ b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs @@ -17,6 +17,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Runtime.CompilerServices; using OpenTelemetry.Exporter.Jaeger.Implementation; using OpenTelemetry.Resources; @@ -28,8 +29,6 @@ namespace OpenTelemetry.Exporter { public class JaegerExporter : BaseExporter { - private const string DefaultServiceName = "OpenTelemetry Exporter"; - private readonly int maxPayloadSizeInBytes; private readonly TProtocolFactory protocolFactory; private readonly TTransport clientTransport; @@ -58,7 +57,9 @@ internal JaegerExporter(JaegerExporterOptions options, TTransport clientTranspor this.memoryTransport = new InMemoryTransport(16000); this.memoryProtocol = this.protocolFactory.GetProtocol(this.memoryTransport); - this.Process = new Process(DefaultServiceName, options.ProcessTags); + string serviceName = (string)this.ParentProvider.GetDefaultResource().Attributes.Where( + pair => pair.Key == ResourceSemanticConventions.AttributeServiceName).FirstOrDefault().Value; + this.Process = new Process(serviceName, options.ProcessTags); } internal Process Process { get; set; } @@ -130,14 +131,14 @@ internal void SetResourceAndInitializeBatch(Resource resource) if (serviceName != null) { - process.ServiceName = serviceNamespace != null - ? serviceNamespace + "." + serviceName - : serviceName; + serviceName = string.IsNullOrEmpty(serviceNamespace) + ? serviceName + : serviceNamespace + "." + serviceName; } - if (string.IsNullOrEmpty(process.ServiceName)) + if (!string.IsNullOrEmpty(serviceName)) { - process.ServiceName = DefaultServiceName; + process.ServiceName = serviceName; } this.Process.Message = this.BuildThriftMessage(this.Process).ToArray(); diff --git a/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net452/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net452/PublicAPI.Unshipped.txt index cc5e9e72e75..4ca16ec8bad 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net452/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net452/PublicAPI.Unshipped.txt @@ -7,8 +7,6 @@ OpenTelemetry.Exporter.ZipkinExporterOptions.Endpoint.get -> System.Uri OpenTelemetry.Exporter.ZipkinExporterOptions.Endpoint.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.ExportProcessorType.get -> OpenTelemetry.ExportProcessorType OpenTelemetry.Exporter.ZipkinExporterOptions.ExportProcessorType.set -> void -OpenTelemetry.Exporter.ZipkinExporterOptions.ServiceName.get -> string -OpenTelemetry.Exporter.ZipkinExporterOptions.ServiceName.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.UseShortTraceIds.get -> bool OpenTelemetry.Exporter.ZipkinExporterOptions.UseShortTraceIds.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.ZipkinExporterOptions() -> void diff --git a/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net461/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net461/PublicAPI.Unshipped.txt index c2de59b6d4b..30a9861d7bb 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net461/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.Zipkin/.publicApi/net461/PublicAPI.Unshipped.txt @@ -9,8 +9,6 @@ OpenTelemetry.Exporter.ZipkinExporterOptions.ExportProcessorType.get -> OpenTele OpenTelemetry.Exporter.ZipkinExporterOptions.ExportProcessorType.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.MaxPayloadSizeInBytes.get -> int? OpenTelemetry.Exporter.ZipkinExporterOptions.MaxPayloadSizeInBytes.set -> void -OpenTelemetry.Exporter.ZipkinExporterOptions.ServiceName.get -> string -OpenTelemetry.Exporter.ZipkinExporterOptions.ServiceName.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.UseShortTraceIds.get -> bool OpenTelemetry.Exporter.ZipkinExporterOptions.UseShortTraceIds.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.ZipkinExporterOptions() -> void diff --git a/src/OpenTelemetry.Exporter.Zipkin/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.Zipkin/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt index c2de59b6d4b..30a9861d7bb 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.Zipkin/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt @@ -9,8 +9,6 @@ OpenTelemetry.Exporter.ZipkinExporterOptions.ExportProcessorType.get -> OpenTele OpenTelemetry.Exporter.ZipkinExporterOptions.ExportProcessorType.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.MaxPayloadSizeInBytes.get -> int? OpenTelemetry.Exporter.ZipkinExporterOptions.MaxPayloadSizeInBytes.set -> void -OpenTelemetry.Exporter.ZipkinExporterOptions.ServiceName.get -> string -OpenTelemetry.Exporter.ZipkinExporterOptions.ServiceName.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.UseShortTraceIds.get -> bool OpenTelemetry.Exporter.ZipkinExporterOptions.UseShortTraceIds.set -> void OpenTelemetry.Exporter.ZipkinExporterOptions.ZipkinExporterOptions() -> void diff --git a/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md b/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md index e56edf4bb28..3aee8950918 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md @@ -5,6 +5,10 @@ * Moved `ZipkinExporter` and `ZipkinExporterOptions` classes to `OpenTelemetry.Exporter` namespace. ([#1770](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1770)) +* Removes ability to configure ServiceName for Zipkin. ServiceName must come + via Resource. If service name is not found in Resource, Zipkin uses + GetDefaultResource API from the SDK. + [#1768](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1768) ## 1.0.0-rc2 diff --git a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs index 55a67d3a03c..0205157694a 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs +++ b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs @@ -18,6 +18,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; @@ -119,7 +120,8 @@ internal void SetLocalEndpointFromResource(Resource resource) if (string.IsNullOrEmpty(serviceName)) { - serviceName = this.options.ServiceName; + serviceName = (string)this.ParentProvider.GetDefaultResource().Attributes.Where( + pair => pair.Key == ResourceSemanticConventions.AttributeServiceName).FirstOrDefault().Value; } this.LocalEndpoint = new ZipkinEndpoint( diff --git a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporterOptions.cs b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporterOptions.cs index f1ec8915851..57985dec1d9 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporterOptions.cs +++ b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporterOptions.cs @@ -16,6 +16,8 @@ using System; using System.Diagnostics; +using System.Linq; +using OpenTelemetry.Resources; namespace OpenTelemetry.Exporter { @@ -24,18 +26,10 @@ namespace OpenTelemetry.Exporter /// public sealed class ZipkinExporterOptions { - internal const string DefaultServiceName = "OpenTelemetry Exporter"; - #if !NET452 internal const int DefaultMaxPayloadSizeInBytes = 4096; #endif - /// - /// Gets or sets the name of the service reporting telemetry. If the `Resource` associated with the telemetry - /// has "service.name" defined, then it'll be preferred over this option. - /// - public string ServiceName { get; set; } = DefaultServiceName; - /// /// Gets or sets Zipkin endpoint address. See https://zipkin.io/zipkin-api/#/default/post_spans. /// Typically https://zipkin-server-name:9411/api/v2/spans. diff --git a/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt index bd352476ea3..6e396d697c7 100644 --- a/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt @@ -119,6 +119,7 @@ override OpenTelemetry.Trace.TraceIdRatioBasedSampler.ShouldSample(in OpenTeleme abstract OpenTelemetry.BaseExportProcessor.OnExport(T data) -> void override sealed OpenTelemetry.BaseExportProcessor.OnStart(T data) -> void readonly OpenTelemetry.BaseExportProcessor.exporter -> OpenTelemetry.BaseExporter +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.Resources.ResourceBuilderExtensions.AddEnvironmentVariableDetector(this OpenTelemetry.Resources.ResourceBuilder resourceBuilder) -> OpenTelemetry.Resources.ResourceBuilder static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource diff --git a/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt index a2634179477..927eff8b5c7 100644 --- a/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt @@ -119,6 +119,7 @@ override OpenTelemetry.Trace.TraceIdRatioBasedSampler.ShouldSample(in OpenTeleme abstract OpenTelemetry.BaseExportProcessor.OnExport(T data) -> void override sealed OpenTelemetry.BaseExportProcessor.OnStart(T data) -> void readonly OpenTelemetry.BaseExportProcessor.exporter -> OpenTelemetry.BaseExporter +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.Resources.ResourceBuilderExtensions.AddEnvironmentVariableDetector(this OpenTelemetry.Resources.ResourceBuilder resourceBuilder) -> OpenTelemetry.Resources.ResourceBuilder static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource diff --git a/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt index dc1710590b2..20a97782078 100644 --- a/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt @@ -143,6 +143,7 @@ abstract OpenTelemetry.BaseExportProcessor.OnExport(T data) -> void override sealed OpenTelemetry.BaseExportProcessor.OnStart(T data) -> void readonly OpenTelemetry.BaseExportProcessor.exporter -> OpenTelemetry.BaseExporter static Microsoft.Extensions.Logging.OpenTelemetryLoggingExtensions.AddOpenTelemetry(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure = null) -> Microsoft.Extensions.Logging.ILoggingBuilder +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.Resources.ResourceBuilderExtensions.AddEnvironmentVariableDetector(this OpenTelemetry.Resources.ResourceBuilder resourceBuilder) -> OpenTelemetry.Resources.ResourceBuilder static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource diff --git a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt index dc1710590b2..20a97782078 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt @@ -143,6 +143,7 @@ abstract OpenTelemetry.BaseExportProcessor.OnExport(T data) -> void override sealed OpenTelemetry.BaseExportProcessor.OnStart(T data) -> void readonly OpenTelemetry.BaseExportProcessor.exporter -> OpenTelemetry.BaseExporter static Microsoft.Extensions.Logging.OpenTelemetryLoggingExtensions.AddOpenTelemetry(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure = null) -> Microsoft.Extensions.Logging.ILoggingBuilder +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource static OpenTelemetry.Resources.ResourceBuilderExtensions.AddEnvironmentVariableDetector(this OpenTelemetry.Resources.ResourceBuilder resourceBuilder) -> OpenTelemetry.Resources.ResourceBuilder static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource diff --git a/src/OpenTelemetry/CHANGELOG.md b/src/OpenTelemetry/CHANGELOG.md index 5930d1418f6..c35462bb27a 100644 --- a/src/OpenTelemetry/CHANGELOG.md +++ b/src/OpenTelemetry/CHANGELOG.md @@ -4,6 +4,8 @@ * Default `Resource` will now contain service.name instead of Telemetry SDK. [#1744](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1744) +* Added GetDefaultResource() method to `Provider`. + [#1768](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1768) ## 1.0.0-rc2 diff --git a/src/OpenTelemetry/ProviderExtensions.cs b/src/OpenTelemetry/ProviderExtensions.cs index c5b231c321a..4f792c151af 100644 --- a/src/OpenTelemetry/ProviderExtensions.cs +++ b/src/OpenTelemetry/ProviderExtensions.cs @@ -38,5 +38,15 @@ public static Resource GetResource(this BaseProvider baseProvider) return Resource.Empty; } + + /// + /// Gets the associated with the . + /// + /// . + /// if found otherwise . + public static Resource GetDefaultResource(this BaseProvider baseProvider) + { + return ResourceBuilder.CreateDefault().Build(); + } } } diff --git a/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs b/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs index 4a04979e71a..d25e3bbfb26 100644 --- a/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs +++ b/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs @@ -27,8 +27,6 @@ namespace OpenTelemetry.Exporter.Jaeger.Tests { public class JaegerExporterTests { - private const string DefaultServiceName = "OpenTelemetry Exporter"; - [Fact] public void JaegerExporter_BadArgs() { diff --git a/test/OpenTelemetry.Exporter.Zipkin.Tests/ZipkinExporterTests.cs b/test/OpenTelemetry.Exporter.Zipkin.Tests/ZipkinExporterTests.cs index 24e5bb99f6e..47829b712b1 100644 --- a/test/OpenTelemetry.Exporter.Zipkin.Tests/ZipkinExporterTests.cs +++ b/test/OpenTelemetry.Exporter.Zipkin.Tests/ZipkinExporterTests.cs @@ -105,7 +105,6 @@ public void SuppresssesInstrumentation() var exporterOptions = new ZipkinExporterOptions { - ServiceName = "test-zipkin", Endpoint = new Uri($"http://{this.testServerHost}:{this.testServerPort}/api/v2/spans?requestId={requestId}"), }; var zipkinExporter = new ZipkinExporter(exporterOptions); @@ -171,8 +170,9 @@ public void IntegrationTest( UseShortTraceIds = useShortTraceIds, }); - var serviceName = ZipkinExporterOptions.DefaultServiceName; - var resoureTags = string.Empty; + var serviceName = (string)exporter.ParentProvider.GetDefaultResource().Attributes + .Where(pair => pair.Key == ResourceSemanticConventions.AttributeServiceName).FirstOrDefault().Value; + var resourceTags = string.Empty; var activity = CreateTestActivity(isRootSpan: isRootSpan, status: status); if (useTestResource) { @@ -237,7 +237,7 @@ public void IntegrationTest( } Assert.Equal( - $@"[{{""traceId"":""{traceId}"",""name"":""Name"",{parentId}""id"":""{ZipkinActivityConversionExtensions.EncodeSpanId(context.SpanId)}"",""kind"":""CLIENT"",""timestamp"":{timestamp},""duration"":60000000,""localEndpoint"":{{""serviceName"":""{serviceName}""{ipInformation}}},""remoteEndpoint"":{{""serviceName"":""http://localhost:44312/""}},""annotations"":[{{""timestamp"":{eventTimestamp},""value"":""Event1""}},{{""timestamp"":{eventTimestamp},""value"":""Event2""}}],""tags"":{{{resoureTags}""stringKey"":""value"",""longKey"":""1"",""longKey2"":""1"",""doubleKey"":""1"",""doubleKey2"":""1"",""longArrayKey"":""1,2"",""boolKey"":""true"",""boolArrayKey"":""true,false"",""http.host"":""http://localhost:44312/"",{statusTag}""otel.library.name"":""CreateTestActivity"",""peer.service"":""http://localhost:44312/""{errorTag}}}}}]", + $@"[{{""traceId"":""{traceId}"",""name"":""Name"",{parentId}""id"":""{ZipkinActivityConversionExtensions.EncodeSpanId(context.SpanId)}"",""kind"":""CLIENT"",""timestamp"":{timestamp},""duration"":60000000,""localEndpoint"":{{""serviceName"":""{serviceName}""{ipInformation}}},""remoteEndpoint"":{{""serviceName"":""http://localhost:44312/""}},""annotations"":[{{""timestamp"":{eventTimestamp},""value"":""Event1""}},{{""timestamp"":{eventTimestamp},""value"":""Event2""}}],""tags"":{{{resourceTags}""stringKey"":""value"",""longKey"":""1"",""longKey2"":""1"",""doubleKey"":""1"",""doubleKey2"":""1"",""longArrayKey"":""1,2"",""boolKey"":""true"",""boolArrayKey"":""true,false"",""http.host"":""http://localhost:44312/"",{statusTag}""otel.library.name"":""CreateTestActivity"",""peer.service"":""http://localhost:44312/""{errorTag}}}}}]", Responses[requestId]); }