feat(remote): omit builtin-tool spans from OTLP delivery - #44
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
encodeSpannow omitsrecord.KindBuiltinToolrecords instead of shipping them to the OTLP receiver — exporting everyBash/Read/Writespan 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 onfeat/otlp-remotefirst 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
make validate— lint, vet, and full test suite pass.go test ./internal/remote/... -run TestFlushOmitsBuiltinToolsWithoutPostingAnEmptyBatch -vexercises the empty-batch skip specifically.builtin_toolrecord and amcp_toolrecord, runwake remote flush, confirm only themcp_toolspan reaches the receiver and the report counts the builtin one as omitted.Screenshots
Checklists