Skip to content

Make OTel export opt-in via FSHARP_OTEL_EXPORT - #20502

Closed
xperiandri wants to merge 1 commit into
dotnet:mainfrom
xperiandri:fix/otel-opt-in
Closed

Make OTel export opt-in via FSHARP_OTEL_EXPORT#20502
xperiandri wants to merge 1 commit into
dotnet:mainfrom
xperiandri:fix/otel-opt-in

Conversation

@xperiandri

Copy link
Copy Markdown
Contributor

otelExport() unconditionally started exporting metrics and traces to http://127.0.0.1:4317. With nothing listening there — the normal case — that is a background exporter stuck retrying and a 5s flush on every shutdown, for every Debug VSIX session regardless of whether anyone is collecting the data.

Exporting now only starts when FSHARP_OTEL_EXPORT names a collector endpoint. The VisualFSharpDebug launch profile sets it so F5 behaves as before, and a new "No OTEL" profile omits it.

The code is under #if DEBUG, so this only affects Debug VSIX builds.

🤖 Generated with Claude Code

otelExport() unconditionally started exporting metrics and traces to
http://127.0.0.1:4317. With nothing listening there, that's a background
exporter stuck retrying and a 5s flush on every shutdown, for every Debug
VSIX session regardless of whether anyone is collecting the data.

Exporting now only starts when FSHARP_OTEL_EXPORT names a collector
endpoint. The "VisualFSharpDebug" launch profile sets it to keep F5
behaving as before, and a new "No OTEL" profile omits it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required

You can open this PR in browser to add release notes: open in github.dev

@xperiandri,

Caution

No release notes found for the changed paths (see table below).

Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.

The following format is recommended for this repository:

`* . (PR #XXXXX)`

See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.

If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

Change path Release notes path Description
`vsintegration/src` docs/release-notes/.VisualStudio/18.vNext.md No release notes found or release notes format is not correct

@xperiandri

Copy link
Copy Markdown
Contributor Author

Duplicate of #20468, which does the same thing more completely (DEVGUIDE, release notes, and a dedicated OTEL Export launch profile). Closing in favour of that one.

@xperiandri xperiandri closed this Sep 9, 2026
@xperiandri
xperiandri deleted the fix/otel-opt-in branch September 9, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant