Skip to content

Commit

Permalink
OpenTelemetry settings (#1831)
Browse files Browse the repository at this point in the history
Co-authored-by: Chet Husk <baronfel@users.noreply.github.com>
  • Loading branch information
TheAngryByrd and baronfel authored Feb 26, 2023
1 parent 1bb6acd commit 07133a8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,25 @@
"description": "Automatically shows the MSBuild output panel when MSBuild functionality is invoked",
"type": "boolean"
},
"FSharp.notifications.trace": {
"default": false,
"description": "Enables more verbose notifications using System.Diagnostics.Activity to view traces from FSharp.Compiler.Service.",
"type" : "boolean"
},
"FSharp.notifications.traceNamespaces": {
"default": [
"BoundModel.TypeCheck",
"BackgroundCompiler."
],
"description": "The set of System.Diagnostics.Activity names to watch.",
"type" : "array",
"required": ["FSharp.notifications.trace"]
},
"FSharp.openTelemetry.enabled": {
"default": false,
"description": "Enables OpenTelemetry exporter. See https://opentelemetry.io/docs/reference/specification/protocol/exporter/ for environment variables to configure for the exporter. Requires Restart.",
"type": "boolean"
},
"FSharp.pipelineHints.enabled": {
"default": true,
"description": "Enables PipeLine hints, which are like LineLenses that appear along each step of a chain of piped expressions",
Expand Down
5 changes: 5 additions & 0 deletions src/Core/LanguageService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,9 @@ Consider:
let enableAdaptiveLspServer =
"FSharp.enableAdaptiveLspServer" |> Configuration.get false

let openTelemetryEnabled =
"FSharp.openTelemetry.enabled" |> Configuration.get false

let enableProjectGraph =
"FSharp.enableMSBuildProjectGraph" |> Configuration.get false

Expand Down Expand Up @@ -809,6 +812,8 @@ Consider:
yield "--project-graph-enabled"
if enableAdaptiveLspServer then
yield "--adaptive-lsp-server-enabled"
if openTelemetryEnabled then
yield "--otel-exporter-enabled"
if verbose then
yield "--verbose"
if fsacSilencedLogs <> null && fsacSilencedLogs.Length > 0 then
Expand Down

0 comments on commit 07133a8

Please sign in to comment.