Describe the Bug
On Cloudflare, durable work can continue in a later invocation. If the owning span is missing, child spans do not carry enough identifiers to join the fragments.
The events already have the IDs. @flue/opentelemetry projects them through identifiers(event). The Cloudflare adapter currently:
- puts submission, instance, and conversation on agent operations, but not
flue.operation.id
- puts task id on task operations, but not submission or operation id
- omits submission, operation, and turn ids from model and model-tool spans
- omits submission and operation ids from caller-shell spans
This is an exporter gap, not a runtime execution bug. The IDs are present on the events; they are just not copied onto those spans.
Expected Behavior
Keep every existing span name and parent relationship. Add only these optional attributes when the event already has the value:
- agent operation:
flue.operation.id
- task:
flue.submission.id, flue.operation.id
- model and model-tool:
flue.submission.id, flue.operation.id, flue.turn.id
- caller-shell: submission and operation ids when present
Do not add new spans, eventIndex, or attempt count. Do not copy the rest of OpenTelemetry's identifier set (harness, session, parent_session, and so on).
Steps to Reproduce
- Trace an agent prompt that includes a model turn and a tool call with
createCloudflareTracing().
- Compare those span attributes with the same run under
createOpenTelemetryInstrumentation().
- Cloudflare child spans are missing the join IDs above even though the corresponding runtime events carry
submissionId, operationId, and turnId.
Relevant code: packages/runtime/src/cloudflare/tracing/index.ts (agent / task / model / tool / caller-shell attribute builders) and packages/runtime/src/cloudflare/tracing/attributes.ts (no operation or turn ID constants today). OpenTelemetry's projection is identifiers() in packages/opentelemetry/src/index.ts.
Describe the Bug
On Cloudflare, durable work can continue in a later invocation. If the owning span is missing, child spans do not carry enough identifiers to join the fragments.
The events already have the IDs.
@flue/opentelemetryprojects them throughidentifiers(event). The Cloudflare adapter currently:flue.operation.idThis is an exporter gap, not a runtime execution bug. The IDs are present on the events; they are just not copied onto those spans.
Expected Behavior
Keep every existing span name and parent relationship. Add only these optional attributes when the event already has the value:
flue.operation.idflue.submission.id,flue.operation.idflue.submission.id,flue.operation.id,flue.turn.idDo not add new spans,
eventIndex, or attempt count. Do not copy the rest of OpenTelemetry's identifier set (harness,session,parent_session, and so on).Steps to Reproduce
createCloudflareTracing().createOpenTelemetryInstrumentation().submissionId,operationId, andturnId.Relevant code:
packages/runtime/src/cloudflare/tracing/index.ts(agent / task / model / tool / caller-shell attribute builders) andpackages/runtime/src/cloudflare/tracing/attributes.ts(no operation or turn ID constants today). OpenTelemetry's projection isidentifiers()inpackages/opentelemetry/src/index.ts.