Skip to content

feat(remote): omit builtin-tool spans from OTLP delivery - #44

Merged
moraisjose merged 1 commit into
feat/otlp-remotefrom
feat/otlp-omit-builtin-tool-spans
Aug 25, 2026
Merged

feat(remote): omit builtin-tool spans from OTLP delivery#44
moraisjose merged 1 commit into
feat/otlp-remotefrom
feat/otlp-omit-builtin-tool-spans

Conversation

@moraisjose

Copy link
Copy Markdown
Collaborator

Description

encodeSpan now omits record.KindBuiltinTool records instead of shipping them to the OTLP receiver — exporting every Bash/Read/Write span buries the user-configured primitives Langfuse is meant to surface. A batch left empty after that omission now skips the POST entirely and just advances the watermark, so an all-builtin batch no longer sends a pointless empty request. Report/CLI wording changes from "dropped ... could not be encoded" to "omitted", since omission is now a deliberate choice as well as an encoding failure.

This is prerequisite work for epic DG-78 ("Langfuse adjustment"), whose issue description already cites this behavior (internal/remote/otlp.go:178) as an existing decision — it wasn't actually committed anywhere yet. Landing it on feat/otlp-remote first makes that citation true before DG-79/80/81/82 build on top of it.

Related Issue

None directly — prerequisite for epic https://supermodularai.atlassian.net/browse/DG-78

How to Test

  1. make validate — lint, vet, and full test suite pass.
  2. go test ./internal/remote/... -run TestFlushOmitsBuiltinToolsWithoutPostingAnEmptyBatch -v exercises the empty-batch skip specifically.
  3. Manually: seed the local store with a builtin_tool record and a mcp_tool record, run wake remote flush, confirm only the mcp_tool span reaches the receiver and the report counts the builtin one as omitted.

Screenshots

Checklists

Exporting every Bash/Read/Write span buries the user-configured
primitives Langfuse is meant to surface, so encodeSpan now omits
KindBuiltinTool records instead of shipping them. A batch left empty
after that omission skips the POST entirely and just advances the
watermark, so an all-builtin batch no longer sends a pointless empty
request. Wording in Report/CLI output changes from "dropped ... could
not be encoded" to "omitted", since omission is now a deliberate
choice as well as an encoding failure.
@moraisjose
moraisjose marked this pull request as ready for review August 25, 2026 17:24
@moraisjose
moraisjose merged commit 9fead91 into feat/otlp-remote Aug 25, 2026
8 checks passed
@moraisjose
moraisjose deleted the feat/otlp-omit-builtin-tool-spans branch August 25, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant