-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Labels
Description
This code
Dim tracingBuilder as TracerProviderBuilder = Sdk.CreateTracerProviderBuilder() _
.ConfigureResource(
Sub(c)
c.AddService("MediaViewServer") _
.AddAttributes(New Dictionary(Of String, Object) _
From {{"License", gLicenceDC.GetInstance().LicenseCode}})
End Sub) _
.SetErrorStatusOnException() _
.AddWcfInstrumentation() _
.AddGrpcCoreInstrumentation() _
.AddOtlpExporter(
Sub(c)
c.ExportProcessorType = ExportProcessorType.Batch
c.BatchExportProcessorOptions = New BatchExportProcessorOptions(Of Activity) _
With {.ExporterTimeoutMilliseconds = 5000}
c.Endpoint = New Uri(tracingUrl)
c.Protocol = otlpExportProtocol
End Sub) _
.AddSource(GetType(EnumerableAsLz4EncodedStream(Of ClassificationsChunk)).FullName) _
.AddSource(GetType(EnumerableAsLz4EncodedStream(Of RmaDataChunk)).FullName) _
.AddSource(GetType(NloRadioMarketAnalysisStreamingServiceCore).FullName)
turns into:
var tracingBuilder =
OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddGrpcCoreInstrumentation(
OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddWcfInstrumentation(
OpenTelemetry.Trace.TracerProviderBuilderExtensions.SetErrorStatusOnException(
OpenTelemetry.Trace.TracerProviderBuilderExtensions.ConfigureResource(
Sdk.CreateTracerProviderBuilder(),
c => ResourceBuilderExtensions.AddService(c, "MediaViewServer")
.AddAttributes((IEnumerable<KeyValuePair<string, object>>)new Dictionary<string, object>() { { "License", gLicenceDC.GetInstance().LicenseCode } })))))
.AddOtlpExporter(c =>
{
c.ExportProcessorType = ExportProcessorType.Batch;
c.BatchExportProcessorOptions = new BatchExportProcessorOptions<Activity>() { ExporterTimeoutMilliseconds = 5000 };
c.Endpoint = new Uri(tracingUrl);
c.Protocol = otlpExportProtocol;
})
.AddSource(typeof(EnumerableAsLz4EncodedStream<ClassificationsChunk>).FullName)
.AddSource(typeof(EnumerableAsLz4EncodedStream<RmaDataChunk>).FullName).AddSource(typeof(NloRadioMarketAnalysisStreamingServiceCore).FullName);
However, nested methods are extension methods.
Installed extension: 9.2.3.0