You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(analytics): break usage and cost down by calling extension
The caller identity from ADR-177 reached telemetry only, where no cost
is recorded — so it could not answer the question it exists for. It now
travels the cost path as well (ADR-178): source_extension is a column on
tx_nrllm_service_usage and part of its daily aggregation key, fed from
the same request metadata TelemetryMiddleware reads, so the cost row and
the telemetry row cannot disagree about who called.
The Analytics module gains a By-extension chart and a per-extension
table (cost, requests, tokens). Calls that name no caller are listed as
Unattributed rather than hidden.
trackUsage() grows one optional trailing parameter; api-surface.txt is
regenerated additively.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,15 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
## [Unreleased]
8
8
9
9
### Added
10
+
-**Analytics answers "which extension spent what"** (ADR-178). The usage
11
+
table carries the caller's extension key next to the money, so the
12
+
Analytics module gains a *By extension* chart and a per-extension table
13
+
with cost, requests and tokens. Calls that name no caller — wizard
14
+
tasks, scheduler runs, anything unannotated — are listed as
15
+
*Unattributed*. `UsageTrackerServiceInterface::trackUsage()` grows one
16
+
optional trailing `$sourceExtension` parameter (additive); rows written
17
+
before this change stay unattributed.
18
+
10
19
-**Agent-harness verification.**`docs/ARCHITECTURE.md` (component map + phpat dependency-rule summary), `docs/exec-plans/` scaffold, `Build/Scripts/verify-harness.sh`, and a `harness-verify.yml` workflow — a thin caller of the shared `script-check` reusable — that fails CI on an AGENTS.md line-budget or dead-reference regression.
11
20
12
21
- A caller can choose the correlation id its call is traced under, through
Copy file name to clipboardExpand all lines: Resources/Private/Language/de.locallang.xlf
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1212,6 +1212,30 @@
1212
1212
<source>By service</source>
1213
1213
<target>Nach Dienst</target>
1214
1214
</trans-unit>
1215
+
<trans-unitid="analytics.breakdown.source">
1216
+
<source>By extension</source>
1217
+
<target>Nach Extension</target>
1218
+
</trans-unit>
1219
+
<trans-unitid="analytics.source.title">
1220
+
<source>Per calling extension</source>
1221
+
<target>Pro aufrufender Extension</target>
1222
+
</trans-unit>
1223
+
<trans-unitid="analytics.source.description">
1224
+
<source>What each extension spent through this installation. An extension appears here once it names itself on its calls; usage from wizards, scheduler runs and other unnamed callers is listed as unattributed.</source>
1225
+
<target>Was jede Extension über diese Installation ausgegeben hat. Eine Extension erscheint hier, sobald sie sich bei ihren Aufrufen benennt; Verbrauch aus Assistenten, Scheduler-Läufen und anderen unbenannten Aufrufern steht unter "Nicht zugeordnet".</target>
1226
+
</trans-unit>
1227
+
<trans-unitid="analytics.source.unattributed">
1228
+
<source>Unattributed</source>
1229
+
<target>Nicht zugeordnet</target>
1230
+
</trans-unit>
1231
+
<trans-unitid="analytics.source.empty">
1232
+
<source>No usage recorded in this period.</source>
1233
+
<target>In diesem Zeitraum wurde kein Verbrauch erfasst.</target>
Copy file name to clipboardExpand all lines: Resources/Private/Language/locallang.xlf
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -916,6 +916,24 @@
916
916
<trans-unitid="analytics.breakdown.service">
917
917
<source>By service</source>
918
918
</trans-unit>
919
+
<trans-unitid="analytics.breakdown.source">
920
+
<source>By extension</source>
921
+
</trans-unit>
922
+
<trans-unitid="analytics.source.title">
923
+
<source>Per calling extension</source>
924
+
</trans-unit>
925
+
<trans-unitid="analytics.source.description">
926
+
<source>What each extension spent through this installation. An extension appears here once it names itself on its calls; usage from wizards, scheduler runs and other unnamed callers is listed as unattributed.</source>
927
+
</trans-unit>
928
+
<trans-unitid="analytics.source.unattributed">
929
+
<source>Unattributed</source>
930
+
</trans-unit>
931
+
<trans-unitid="analytics.source.empty">
932
+
<source>No usage recorded in this period.</source>
0 commit comments