Skip to content

fix(cli): decode fixed32 OTLP span flags#234

Merged
Makisuo merged 3 commits into
mainfrom
agent/fix-otlp-span-flags
Jul 19, 2026
Merged

fix(cli): decode fixed32 OTLP span flags#234
Makisuo merged 3 commits into
mainfrom
agent/fix-otlp-span-flags

Conversation

@Makisuo

@Makisuo Makisuo commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • align the vendored OTLP trace schema with upstream by defining Span.flags and Link.flags as fixed32
  • add a Python SDK-compatible protobuf fixture with a non-zero field-16 flags value
  • verify the decoded request continues through Maple's trace encoder

Root cause

The local receiver declared the trace flags fields as uint32, while the OTLP schema defines them as fixed32. Real SDKs therefore emitted a different wire type, and protobuf decoding could desynchronize or reject spans whose sampled flag was set.

Impact

Local mode accepts sampled spans emitted by OpenTelemetry SDKs instead of returning HTTP 400, and preserves their flags value during decoding.

Validation

  • bun --filter @maple/cli test — 101 passed
  • bun --filter @maple/cli typecheck
  • bunx oxfmt --check apps/cli/src/server/otlp/proto.ts apps/cli/src/server/otlp/encode.test.ts
  • bunx oxlint apps/cli/src/server/otlp/proto.ts apps/cli/src/server/otlp/encode.test.ts

Closes #221


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

@Makisuo
Makisuo marked this pull request as ready for review July 19, 2026 22:54
@pullfrog

pullfrog Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Your Pullfrog Router balance is exhausted.

You have a card on file but auto-reload is disabled, so runs paused once your balance went past the overdraft buffer.

Top up balance → · Enable auto-reload →

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Rerun failed job ➔View workflow run | via Pullfrog | Using Claude Opus𝕏

@Makisuo
Makisuo merged commit 0b9cdaf into main Jul 19, 2026
6 of 8 checks passed
@Makisuo
Makisuo deleted the agent/fix-otlp-span-flags branch July 19, 2026 22:54

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

Local mode OTLP ingest fails on spans with a non-zero flags field

1 participant