@veryfront/ext-observability-opentelemetry 0.1.1245 → 0.1.1246-rc.13463
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -73,3 +73,44 @@ In shared Veryfront runtimes, these variables are platform-owned host env vars.
|
|
|
73
73
|
|
|
74
74
|
- **net `*`:** OTLP exporter reaches the configured collector.
|
|
75
75
|
- **env:** reads the `OTEL_*` variables listed above.
|
|
76
|
+
|
|
77
|
+
## Workflow spans and map fan-out
|
|
78
|
+
|
|
79
|
+
With this extension registered, the workflow executor emits a `workflow.run` span per
|
|
80
|
+
execution and a `workflow.node <id>` span per node, and agent spans nest beneath the node
|
|
81
|
+
that produced them.
|
|
82
|
+
|
|
83
|
+
Node spans are named after the node id so a trace reads at a glance. Generated child nodes
|
|
84
|
+
carry generated ids — `<map>_0`, `<map>_1`, … for map items and `<loop>_iter_0`,
|
|
85
|
+
`<loop>_iter_1`, … for loop iterations — so a `map` over a large collection, or a long
|
|
86
|
+
`loop`, produces both one span per child and one distinct span _name_ per child. Two consequences worth
|
|
87
|
+
planning for:
|
|
88
|
+
|
|
89
|
+
- **Span volume.** A map over 10,000 items yields at least 10,000 node spans in a single
|
|
90
|
+
trace, before any agent spans nested beneath them. The framework applies no cap; use the
|
|
91
|
+
batch span processor's queue settings (`OTEL_BSP_MAX_QUEUE_SIZE`,
|
|
92
|
+
`OTEL_BSP_MAX_EXPORT_BATCH_SIZE`) or collector-side tail sampling to bound it.
|
|
93
|
+
- **Name cardinality.** Backends that aggregate by span name — for example Tempo's metrics
|
|
94
|
+
generator — will see one series per item. Drop or rewrite `workflow.node` names at the
|
|
95
|
+
collector if that matters for your backend.
|
|
96
|
+
|
|
97
|
+
Runs are traced per execution attempt. A run that pauses at a wait node or a pending
|
|
98
|
+
approval and later resumes produces a _separate_ trace from its first execution; every span
|
|
99
|
+
carries `workflow.run_id`, so filtering on that attribute reassembles the whole run across
|
|
100
|
+
executions.
|
|
101
|
+
|
|
102
|
+
`workflow.run` is a trace root only when nothing traces the caller. Started from an
|
|
103
|
+
instrumented HTTP handler, webhook, or approval callback it becomes a child of that
|
|
104
|
+
request's span and joins its trace. That is usually what you want — the run appears under
|
|
105
|
+
the request that triggered it — but note the request span typically finishes before the run
|
|
106
|
+
does, because execution is dispatched without being awaited.
|
|
107
|
+
|
|
108
|
+
Node spans carry `workflow.node.status`, and a failed node or run sets the span status to
|
|
109
|
+
ERROR, so the usual errored-spans filters in Jaeger, Tempo and Datadog work. A cancelled run
|
|
110
|
+
is not a failure: the in-flight node span ends as ERROR carrying the cancellation reason,
|
|
111
|
+
while the `workflow.run` span stays unset, so cancellations do not show up in errored-run
|
|
112
|
+
queries.
|
|
113
|
+
|
|
114
|
+
Retry attempts of a composite node appear as repeated sibling spans sharing one name. They
|
|
115
|
+
are told apart by status — the attempts that failed are ERROR, the one that succeeded is
|
|
116
|
+
not — and the parent node span carries a `workflow.node.retry` event per retry.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfront/ext-observability-opentelemetry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1246-rc.13463",
|
|
4
4
|
"description": "Veryfront first-party extension package for ext-observability-opentelemetry",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"veryfront",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"protobufjs": "7.6.5"
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
|
-
"veryfront": "^0.1.
|
|
115
|
+
"veryfront": "^0.1.1246-rc.13463"
|
|
116
116
|
},
|
|
117
117
|
"type": "module",
|
|
118
118
|
"types": "./esm/index.d.ts",
|