Repository navigation
Conversation
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.
I found two telemetry failures on large Compass runs: oversized OTLP batches were rejected, and some spans never appeared in LangSmith even after successful export acknowledgements. Missing signal spans made completed analysis look as though it had never run, and surviving spans could give an incomplete picture of usage.
Approach
I buffer completed spans on disk until shutdown, then export parents before their children. Each request contains at most 64 spans, and a parent must be acknowledged in an earlier request before its children are sent. Files are removed after acknowledgement; failed requests get one retry, and undelivered spans remain on disk.
I wrap embedding requests in OpenInference’s
suppress_tracing()context. Embedding spans are never collected, buffered, or uploaded; the application still receives the original embedding results. Other agent, model, tool, and signal spans remain traced.This is a workaround for the observed losses after acknowledgement; I have not established the receiving-side cause.
Alternatives tested
I tested alternatives on a 10,000-trace corpus with four signals and remote embeddings. Raising only the client limit to 128 MiB still lost 470 of 2,678 spans. At 512 MiB, the endpoint returned 11 HTTP 413 responses without any client size-limit drops, so I stopped that attempt. The experiment is recorded in closed PR #126.
Hiding vectors and setting
OTEL_BSP_MAX_EXPORT_BATCH_SIZE=8, without disk buffering, avoided size failures: the largest request was 3.65 MiB and every export succeeded. LangSmith nevertheless missed 68 of 2,710 acknowledged spans, including three signal roots. The missing count stayed unchanged across ten backend checks.Validation
Verified locally: I ran 807e0fa through the normal Compass CLI against all 10,000 traces in a large corpus, with every signal enabled and remote embeddings. Five signals completed; grader analysis skipped because the inputs contained no grader results. The run produced seven insights that passed schema validation. A local observer recorded every span ID, and I checked LangSmith storage after export: all 1,429 non-embedding spans ended and were stored with their original parent relationships. No embedding spans were collected. All 27 export requests succeeded, with no HTTP 413 responses; the largest request was 27.9 MiB before compression. Analysis took 113.9 minutes, followed by 76.9 seconds until CLI exit, including telemetry upload.