Commit 44cf643
authored
Add Langfuse trace.userId / trace.sessionId population (0064) (#171)
* Pin spec v0.62.0 for proposal 0064
Advance the spec submodule pin v0.61.0 -> v0.62.0 to absorb accepted
proposal 0064 (Langfuse trace.sessionId / trace.userId population).
Updates __spec_version__, the pyproject spec_version, the smoke-test
version assertion, and regenerates the bundled AGENTS.md.
conformance.toml records 0064 as partial: the trace.userId half ships,
while trace.sessionId is dormant until the sessions capability (0020)
supplies openarmature.session_id.
* Populate Langfuse trace.userId / trace.sessionId (0064)
Implement proposal 0064's Langfuse Trace-level grouping fields. The
observer recognizes a userId key in the caller-supplied invocation
metadata and promotes it to the first-class trace.userId, additively
(the key also stays in trace.metadata.userId). trace.sessionId sources
from openarmature.session_id; python has no source until the sessions
capability (0020), so that half is plumbed but dormant (passes None).
LangfuseClient.trace() (the Protocol, the in-memory client, and the SDK
adapter) gains session_id / user_id; the observer centralizes the
promotion through a _client_trace wrapper so all five trace-open sites
apply it uniformly. Unit tests cover the client plumbing and the
promotion helper; the live integration test plus the extended
end-to-end cloud test assert both fields populate real Langfuse.
* Wire fixture 084 and extend conformance harness
Activate observability fixture 084 (Langfuse session/user promotion):
cases 2/3/4 (not session-bound, userId present additively, userId
absent) run now; the session-bound cases 1/5 defer per-case until the
sessions capability (0020) supplies a session_id source.
Extend the fixture-parsing models for 084's shapes: ObservabilityExpected
gains langfuse_trace / langfuse_traces (and the matching discriminator
keys), and CaseSpec.invocations widens to int | list to carry case 5's
multi-invocation specs alongside the existing run-count usage.
* Document 0064: concepts, changelog, example
Document the Langfuse trace.userId / trace.sessionId population in the
observability concepts page, add the 0.15.0 changelog entry (folding
0064 into the cycle's spec-pin bullet), and demonstrate the userId
promotion in the langfuse-observability example (a per-operator userId
that surfaces in the captured trace). sessionId is left out of the
example since it stays dormant until the sessions capability lands.1 parent 7224e30 commit 44cf643
18 files changed
Lines changed: 277 additions & 18 deletions
File tree
- docs/concepts
- examples/langfuse-observability
- src/openarmature
- observability/langfuse
- tests
- conformance
- harness
- integration
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1048 | 1048 | | |
1049 | 1049 | | |
1050 | 1050 | | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1051 | 1063 | | |
1052 | 1064 | | |
1053 | 1065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| 199 | + | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
277 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
278 | 291 | | |
279 | 292 | | |
280 | 293 | | |
| |||
Submodule openarmature-spec updated 7 files
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
| |||
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
224 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
| |||
292 | 302 | | |
293 | 303 | | |
294 | 304 | | |
| 305 | + | |
| 306 | + | |
295 | 307 | | |
296 | 308 | | |
297 | 309 | | |
| |||
438 | 450 | | |
439 | 451 | | |
440 | 452 | | |
| 453 | + | |
| 454 | + | |
441 | 455 | | |
442 | 456 | | |
443 | 457 | | |
| |||
524 | 538 | | |
525 | 539 | | |
526 | 540 | | |
| 541 | + | |
| 542 | + | |
527 | 543 | | |
528 | 544 | | |
529 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
| |||
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
| 179 | + | |
| 180 | + | |
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
179 | 191 | | |
180 | 192 | | |
181 | 193 | | |
| |||
368 | 380 | | |
369 | 381 | | |
370 | 382 | | |
| 383 | + | |
| 384 | + | |
371 | 385 | | |
372 | 386 | | |
373 | 387 | | |
374 | 388 | | |
375 | 389 | | |
| 390 | + | |
| 391 | + | |
376 | 392 | | |
377 | 393 | | |
378 | 394 | | |
| |||
0 commit comments