Skip to content

Commit 30fd578

Browse files
committed
Don't dispose of the telemetry objects immediately
1 parent d4db68a commit 30fd578

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Compiler/Service/service.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,14 +1206,14 @@ module Foo =
12061206
open OpenTelemetry.Trace
12071207

12081208
let init () =
1209-
use tracerProvider =
1209+
let tracerProvider =
12101210
Sdk.CreateTracerProviderBuilder()
12111211
.AddSource(activitySourceName)
1212-
.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(serviceName ="fsc", serviceVersion = "42.42.42.42"))
1212+
.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(serviceName ="FSharpChecker", serviceVersion = "42.42.42.42"))
12131213
.AddOtlpExporter()
12141214
.AddZipkinExporter()
12151215
.Build();
1216-
use mainActivity = activitySource.StartActivity("main")
1216+
let mainActivity = activitySource.StartActivity("main")
12171217

12181218
let forceCleanup() =
12191219
mainActivity.Dispose()

0 commit comments

Comments
 (0)