Repository navigation
Conversation
…ble 4f01583e71 + d077b0ff0c; Node 22.23.4 base for CVE-2026-111497; acceptance for the tested tree with the Windows first-agent Zen exception, operator decision 54b65a84)
Share the bounded OTLP exporter with every worker so one API request is one trace through the workflow and each activity attempt. Workflow spans leave the sandbox only through interceptors and a replay-silent sink, with span links for continue-as-new and background continuations. Signed-off-by: Dayton Allen <daytonballen@gmail.com> Co-authored-by: dayton536 <dayton536@users.noreply.github.com>
| } | ||
| /** Repeats of one kind of message share a key: digits and dates fold, so "Daily backup missing for 2026-10-25" is one card. */ | ||
| export function monitoringGuardianKey(message: string): string { | ||
| return message.split("\n")[0]!.replace(/\[[^\]]*\]/g, " ").replace(/\d+/g, "N").replace(/[^\p{L}\p{N} _:-]+/gu, " ") |
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.
Problem and user impact
An API request that starts Temporal work could export only the API SERVER span. Workers logged activity attempts, but a slow or failing Room Agent mission, chat turn, or memory repair could not be followed as one trace in an OTLP backend. Implements oll4com/spaceapp#61.
This branch is cut from
oll4com/spaceappmain(f20c00a). It is not for merging intodayton536:main, which still carries an unrelated Podman merge.Change
When
SPACE_OTEL_EXPORTER_OTLP_ENDPOINTis set,space-worker,space-memory-maintenance-worker, andspace-memory-mutation-workerexport spans to<endpoint>/v1/tracesthrough the existing bounded exporter in@space/runtime(queue drops, POST timeout, collector failures never fail the work). When the variable is unset, those processes export nothing and do not load the workflow interceptor.The span tree is the API SERVER span, then an INTERNAL workflow span parented to the propagated
traceparent, then one INTERNAL span per activity attempt (attempt, outcome,reasonCode,category). Child workflows nest under the parent workflow span. Continue-as-new and background continuations (trace:bg-<id>) add an OTLP span link to the run or trace they continue.Workflow code does no tracing I/O. Spans leave the sandbox through Temporal interceptors and a sink with
callDuringReplay: false. Apatchedmarker keeps histories from before export was enabled deterministic. Attributes are allowlisted; prompts, model output, paths, URLs, and error messages are dropped. No OpenTelemetry SDK was added.@temporalio/testingis a worker devDependency for the hermetic test only.Verification
npm run check,npm test -w @space/worker(244 tests), andnpm test -w @space/api -- otlp(plus trace-correlation and memory coordinator tests) on Linux. macOS and Windows were not run.Signed-off-by:line (Developer Certificate of Origin 1.1), and the contribution is licensed under the MIT License (see CONTRIBUTING.md).The integration test uses a local
http.createServercollector and@temporalio/testing's time-skipping server. It checks trace continuity, parent/child spans, activity attempt attributes, continuation links, and that replaying a history emits zero spans. A Jaeger screenshot was not captured here.