From a8903d8a4e280e82fa9f5ebf79ce5baa617352cf Mon Sep 17 00:00:00 2001 From: Jacob Viau Date: Wed, 6 Nov 2024 16:04:42 -0800 Subject: [PATCH] OpenTelemetryBuilder => IOpenTelemetryBuilder --- .../ConfigureFunctionsOpenTelemetry.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DotNetWorker.OpenTelemetry/ConfigureFunctionsOpenTelemetry.cs b/src/DotNetWorker.OpenTelemetry/ConfigureFunctionsOpenTelemetry.cs index 83e232377..a31ab6e8a 100644 --- a/src/DotNetWorker.OpenTelemetry/ConfigureFunctionsOpenTelemetry.cs +++ b/src/DotNetWorker.OpenTelemetry/ConfigureFunctionsOpenTelemetry.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.Functions.Worker.OpenTelemetry { public static class ConfigureFunctionsOpenTelemetry { - public static OpenTelemetryBuilder UseFunctionsWorkerDefaults(this OpenTelemetryBuilder builder) + public static IOpenTelemetryBuilder UseFunctionsWorkerDefaults(this IOpenTelemetryBuilder builder) { if (builder is null) { @@ -17,13 +17,14 @@ public static OpenTelemetryBuilder UseFunctionsWorkerDefaults(this OpenTelemetry } builder.Services - // Lets the host know that the worker is sending logs to App Insights. The host will now ignore these. + // Tells the host to no longer emit telemetry on behalf of the worker. .Configure(workerOptions => workerOptions.Capabilities["WorkerOpenTelemetryEnabled"] = bool.TrueString); builder.ConfigureResource((resourceBuilder) => { resourceBuilder.AddDetector(new FunctionsResourceDetector()); }); + return builder; } }