Repository navigation
fix: [$600] Export worker and workflow spans over OTLP: one trace from API (closes #61) #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
a560c7a
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
2ad40f1
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
87e315a
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
0994c44
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
67176db
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
eb8b949
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
f0c54cf
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
6392c6c
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
297d378
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
4f94ab4
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
6d0f654
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
34e4af6
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
33236d4
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
9b04578
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
ce6d2dd
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
992a0f3
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
2b13222
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
9028335
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
3bf89bc
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
649ba7a
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
5e9df73
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
93da402
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
a034e42
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
2afc037
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
62dcc8b
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
1d65c3d
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
cd6c474
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
a93a440
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
ca1fc43
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
bb1d161
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
ffde7c8
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
1898974
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
e1d355c
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
1b4531b
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
7298afb
fix: [$600] Export worker and workflow spans over OTLP: one trace (#61)
86b77f9
chore: normalize line endings (apps/api/src/memory-consolidation-coor…
d148a38
chore: normalize line endings (apps/api/src/memory-mutation-coordinat…
f98f122
chore: normalize line endings (apps/api/src/trace-context.ts)
bc01f25
chore: normalize line endings (apps/api/tests/otlp-parent-continuity.…
1729787
chore: normalize line endings (apps/api/tests/trace-correlation.test.ts)
e2cfa3d
chore: normalize line endings (apps/worker/package.json)
5e72f6e
chore: normalize line endings (apps/worker/src/activity-observability…
6fd3f09
chore: normalize line endings (apps/worker/src/memory-maintenance-wor…
6a679b5
chore: normalize line endings (apps/worker/src/memory-mutation-worker…
bb36e50
chore: normalize line endings (apps/worker/src/room-background-contin…
b0a4215
chore: normalize line endings (apps/worker/src/tracing/sinks.ts)
b2c9f9e
chore: normalize line endings (apps/worker/src/tracing/span-attribute…
ef550d1
chore: normalize line endings (apps/worker/src/worker-tracing.ts)
1c2dc25
chore: normalize line endings (apps/worker/src/worker.ts)
bd96af1
chore: normalize line endings (apps/worker/src/workflow-tracing-inter…
4261748
chore: normalize line endings (apps/worker/src/workflows/trace-ids.ts)
8843e34
chore: normalize line endings (apps/worker/tests/activity-observabili…
6218dcb
chore: normalize line endings (apps/worker/tests/otlp-attribute-domai…
bf5f7d6
chore: normalize line endings (apps/worker/tests/otlp-background-cont…
763e66f
chore: normalize line endings (apps/worker/tests/otlp-interceptors.te…
5cb05f8
chore: normalize line endings (apps/worker/tests/otlp-worker-tracing.…
3eaeef0
chore: normalize line endings (apps/worker/tests/otlp-workflow-tracin…
4b68add
chore: normalize line endings (apps/worker/tests/room-continuation-fi…
0ec6339
chore: normalize line endings (apps/worker/tests/support/otlp-tracing…
bc9851d
chore: normalize line endings (apps/worker/vitest.config.ts)
0d47c8d
chore: normalize line endings (docs/configuration-reference.md)
68241b6
chore: normalize line endings (docs/quality/observability.md)
e37fb7b
chore: normalize line endings (package-lock.json)
71f6aa2
chore: normalize line endings (packages/contracts/src/schemas.ts)
ded55c9
chore: normalize line endings (packages/run-spaceapp/bin/spaceapp.mjs)
046987e
chore: normalize line endings (packages/runtime/package.json)
dfbbf4c
chore: normalize line endings (packages/runtime/src/__tests__/otlp-sp…
10d90e9
chore: normalize line endings (packages/runtime/src/otlp-span-exporte…
ac4841c
chore: normalize line endings (packages/runtime/src/span-attributes.ts)
db157e2
review: address feedback on #194 (round 1)
e7d8412
review: address feedback on #194 (round 1)
8031415
review: address feedback on #194 (round 3)
8c15d18
review: address feedback on #194 (round 3)
07b882a
review: address feedback on #194 (round 3)
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Thank you for the review guidance. I understand that maintainer review is still pending. | ||
|
|
||
| Verification used Windows 10.0.19045.0, supported Node v22.23.3 and npm 10.9.9, with Temporal CLI 1.9.1 / Server 1.32.0. | ||
| Tested HEAD: 98bcb3859778b85951c6f15902fe82f156562f9e plus the PR working-tree changes. | ||
| Recorded contracts/runtime/worker builds and API/worker type checks passed; runtime tests passed 7 tests and the API selection passed 14. | ||
| OPEN BLOCKER: the initial worker selection timed out (46 passed, 1 failed, 1 skipped). Its unchanged rerun passed, but further sequential repeats passed twice and failed once with the same 5000ms continuity-test timeout. | ||
| Each new passing repeat had 47 passed and 1 skipped; the failed repeat had 46 passed, 1 failed and 1 skipped. The cause remains unknown; no timeout or behavior change was made. | ||
| All 6 Temporal/HTTP integration tests, including replay emitting zero spans and secret-sentinel assertions, passed in both new passing repeats; only the unavailable-server diagnostic was skipped. | ||
| The recorded full worker suite had 242 passed, 14 failed and 1 skipped; the same 14 failures reproduced on the merge-base. | ||
| The recorded root check passed 7 architecture tests before the Windows gateway bundler failed; that bundler failure also reproduced on the merge-base. | ||
| The earlier Node 20 undici error did not recur. Windows socket, symlink, fsync, path and permission limitations remain. | ||
| Removed only the two reported extra EOF blank lines; whole-tree git diff --check now exits 0. Historical failed results are retained. | ||
| See NOTES.md, "Verification for review" and its latest audit follow-up, for commands, counts, baseline comparisons, limitations and log locations. Stable targeted verification is still blocked. | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { describe, expect, it } from "vitest"; | ||
| import { createRequestTraceContext, requestTraceContexts, traceparentForTraceId } from "../src/trace-context.js"; | ||
| import { scheduleMemoryConsolidation } from "../src/memory-consolidation-coordinator.js"; | ||
| import { scheduleMemoryMutation } from "../src/memory-mutation-coordinator.js"; | ||
|
|
||
| describe("OTLP API parent continuity", () => { | ||
| it("uses the exported request span for direct turn and memory workflow starts", async () => { | ||
| const context = createRequestTraceContext(undefined); | ||
| const traceId = "req:otlp-parent-test"; | ||
| requestTraceContexts.remember(traceId, context); | ||
| expect(traceparentForTraceId(traceId)).toBe(context.traceparent); | ||
| const memos: unknown[] = []; | ||
| const start = async (_type: string, options: { workflowId: string; memo?: Record<string, string> }) => { | ||
| memos.push(options.memo); | ||
| return { workflowId: options.workflowId }; | ||
| }; | ||
| await scheduleMemoryConsolidation({ runId: "audit:test", traceId }, "workflow:test", start); | ||
| await scheduleMemoryMutation({ changeSetId: "change:test", traceId }, start); | ||
| expect(memos).toEqual([0, 1].map(() => ({ spaceTraceId: traceId, traceparent: context.traceparent, w3cTraceId: context.w3cTraceId }))); | ||
| }); | ||
| }); |
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import type { Sinks } from "@temporalio/workflow"; | ||
|
|
||
| export type WorkflowSpanOutcome = "COMPLETED" | "FAILED" | "CANCELLED" | "CONTINUED_AS_NEW"; | ||
| export type WorkflowSpanLinkReason = "continue_as_new" | "background_continuation"; | ||
|
|
||
| export interface WorkflowSpanRecord { | ||
| traceId: string; | ||
| spanId: string; | ||
| parentSpanId: string | null; | ||
| startTimeMs: number; | ||
| endTimeMs: number; | ||
| outcome: WorkflowSpanOutcome; | ||
| errorCode: string | null; | ||
| correlation: { spaceTraceId?: string; roomId?: string; paneId?: string; missionId?: string; goalId?: string }; | ||
| links: Array<{ traceId: string; spanId: string; reason: WorkflowSpanLinkReason }>; | ||
| } | ||
|
|
||
| export interface SpaceTracingSinks extends Sinks { | ||
| spaceTracing: { workflowSpan(record: WorkflowSpanRecord): void }; | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| // This subpath has no Node imports or exporter timers and is safe in a workflow bundle. | ||
| export { SPAN_ATTRIBUTE_ALLOWLIST, allowlistSpanAttributes } from "@space/runtime/span-attributes"; | ||
| export { parseTraceparent, formatTraceparent } from "@space/contracts"; | ||
| export { TRACEPARENT_HEADER as TRACE_HEADER, LINK_TRACEPARENT_HEADER as LINK_HEADER } from "../workflow-tracing-headers.js"; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: oll4com/spaceapp
Length of output: 6836
Record the exact revision used for testing.
Line 4 names the comparison base and unspecified working-tree changes. It does not establish that the checks ran against reviewed head
07b882ac2bdcc29edbeef5315079449c226273b2. If the tested tree matched that commit, record its SHA. Otherwise, record the exact tested revision and changes or rerun the checks at the reviewed head.