Make OTel export opt-in via FSHARP_OTEL_EXPORT - #20502
Conversation
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>
❗ Release notes requiredYou can open this PR in browser to add release notes: open in github.dev 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)`
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.
|
|
Duplicate of #20468, which does the same thing more completely (DEVGUIDE, release notes, and a dedicated |
otelExport()unconditionally started exporting metrics and traces tohttp://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_EXPORTnames a collector endpoint. TheVisualFSharpDebuglaunch 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