Skip to content

Commit 232e03e

Browse files
committedJan 25, 2025
format
1 parent 158cad1 commit 232e03e

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed
 

‎src/Compiler/Facilities/DiagnosticsLogger.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,8 @@ type StackGuard(maxDepth: int, name: string) =
876876
[<CallerLineNumber; Optional; DefaultParameterValue(0)>] line: int
877877
) =
878878

879-
Activity.logEvent "DiagnosticsLogger.StackGuard.Guard"
879+
Activity.logEvent
880+
"DiagnosticsLogger.StackGuard.Guard"
880881
(seq {
881882
Activity.Tags.stackGuardName, box name
882883
Activity.Tags.stackGuardCurrentDepth, depth
@@ -886,7 +887,6 @@ type StackGuard(maxDepth: int, name: string) =
886887
Activity.Tags.callerLineNumber, line
887888
})
888889

889-
890890
depth <- depth + 1
891891

892892
try

‎vsintegration/src/FSharp.Editor/Common/Logging.fs

+11-7
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module Logging =
120120

121121
#if DEBUG
122122
module Activity =
123-
123+
124124
open OpenTelemetry.Resources
125125
open OpenTelemetry.Trace
126126

@@ -153,12 +153,16 @@ module Activity =
153153
ActivitySource.AddActivityListener(listener)
154154

155155
let export () =
156-
OpenTelemetry.Sdk.CreateTracerProviderBuilder()
157-
.AddSource(ActivityNames.FscSourceName)
158-
.SetResourceBuilder(
159-
ResourceBuilder.CreateDefault().AddService(serviceName="F#", serviceVersion = "1.0.0"))
160-
.AddOtlpExporter()
161-
.Build()
156+
OpenTelemetry.Sdk
157+
.CreateTracerProviderBuilder()
158+
.AddSource(ActivityNames.FscSourceName)
159+
.SetResourceBuilder(
160+
ResourceBuilder
161+
.CreateDefault()
162+
.AddService(serviceName = "F#", serviceVersion = "1.0.0")
163+
)
164+
.AddOtlpExporter()
165+
.Build()
162166

163167
let listenToAll () = listen ""
164168
#endif

0 commit comments

Comments
 (0)