@@ -64,32 +64,33 @@ For metrics, use `-f dataset=tracemetrics`,
6464
6565## Pivots
6666
67- | Pivot | Meaning | Found In |
68- | --------------------------- | ------------------------------------------ | --------------------------------- |
69- | ` roach.tenant ` | repository of the run | metrics, spans, errors |
70- | ` roach.mode ` | ` auto ` , ` replay ` , ` record ` , ` off ` | metrics, spans, errors |
71- | ` roach.rule ` | recording rule, such as ` model ` | metrics, spans |
72- | ` roach.result ` | ` replayed ` , ` live ` , and others (see Words) | metrics, spans |
73- | ` roach.origin ` | upstream origin | metrics, spans |
74- | ` roach.reason ` | why the proxy refused a request | ` roach.request ` metric and span |
75- | ` roach.run.id ` | ` name ` of the run, else the service id | spans, errors |
76- | ` roach.ci.run_id ` | ` GITHUB_RUN_ID ` of the run | spans, errors |
77- | ` roach.ci.job ` | ` GITHUB_JOB ` of the run | spans, errors |
78- | ` roach.ci.repo ` | ` GITHUB_REPOSITORY ` of the run | spans, errors |
79- | ` roach.ci.ref ` | ` GITHUB_REF ` of the run | spans, errors |
80- | ` roach.session ` | session (test) name of a request | ` roach.request ` |
81- | ` roach.key ` | recording key of a request | ` roach.key ` , ` roach.store.read ` |
82- | ` roach.write ` | the run has the write token (boolean) | ` roach.run.start ` |
83- | ` roach.recordings ` | files that one write sends to the store | ` roach.store.write ` |
84- | ` roach.written ` | files that were new or changed | ` roach.store.write ` |
85- | ` http.request.method ` | method of the request | ` roach.request ` , ` roach.upstream ` |
86- | ` http.response.status_code ` | status to the client | ` roach.request ` , ` roach.upstream ` |
87- | ` gen_ai.request.model ` | model of a model call | ` roach.request ` |
88- | ` miss.sample ` | ` found ` , ` withheld ` , or ` none ` for a miss | ` roach.request ` |
89- | ` miss.changed_at ` | offset of the change of a miss | ` roach.request ` |
90- | ` miss.compared ` | recording key of a miss change | ` roach.request ` |
91- | ` miss.recorded ` | recorded text of a miss change | ` roach.request ` |
92- | ` miss.request ` | sent text of a miss change | ` roach.request ` |
67+ | Pivot | Meaning | Found In |
68+ | --------------------------- | ------------------------------------------------ | ------------------------------------ |
69+ | ` roach.tenant ` | repository of the run | metrics, spans, errors |
70+ | ` roach.mode ` | ` auto ` , ` replay ` , ` record ` , ` off ` | metrics, spans, errors |
71+ | ` roach.rule ` | recording rule, such as ` model ` | metrics, spans |
72+ | ` roach.result ` | ` replayed ` , ` live ` , and others (see Words) | metrics, spans |
73+ | ` roach.origin ` | upstream origin | metrics, spans |
74+ | ` roach.reason ` | why the proxy refused a request | ` roach.request ` metric and span |
75+ | ` roach.run.id ` | ` name ` of the run, else the service id | spans, errors |
76+ | ` roach.ci.run_id ` | ` GITHUB_RUN_ID ` of the run | spans, errors |
77+ | ` roach.ci.job ` | ` GITHUB_JOB ` of the run | spans, errors |
78+ | ` roach.ci.repo ` | ` GITHUB_REPOSITORY ` of the run | spans, errors |
79+ | ` roach.ci.ref ` | ` GITHUB_REF ` of the run | spans, errors |
80+ | ` roach.session ` | session (test) name of a request | ` roach.request ` |
81+ | ` roach.key ` | recording key of a request | ` roach.key ` , ` roach.store.read ` |
82+ | ` roach.write ` | the run has the write token (boolean) | ` roach.run.start ` |
83+ | ` roach.recordings ` | files that one write sends to the store | ` roach.store.write ` |
84+ | ` roach.written ` | files that were new or changed | ` roach.store.write ` , ` roach.run.end ` |
85+ | ` http.request.method ` | method of the request | ` roach.request ` , ` roach.upstream ` |
86+ | ` http.response.status_code ` | status to the client | ` roach.request ` , ` roach.upstream ` |
87+ | ` gen_ai.request.model ` | model that a model call asked for | ` roach.request ` |
88+ | ` gen_ai.response.model ` | model of the response, when the request has none | ` roach.request ` |
89+ | ` miss.sample ` | ` found ` , ` withheld ` , or ` none ` for a miss | ` roach.request ` |
90+ | ` miss.changed_at ` | offset of the change of a miss | ` roach.request ` |
91+ | ` miss.compared ` | recording key of a miss change | ` roach.request ` |
92+ | ` miss.recorded ` | recorded text of a miss change | ` roach.request ` |
93+ | ` miss.request ` | sent text of a miss change | ` roach.request ` |
9394
9495A metric for a ` notAllowed ` request has ` roach.origin:other ` , because the
9596client picks that origin. Its span has the origin.
@@ -255,7 +256,7 @@ Spent and saved, by rule and model.
255256``` bash
256257sentry explore sentry/roach --dataset spans --period 24h \
257258 -q ' span.op:roach.request has:gen_ai.usage.input_tokens' \
258- -F roach.result -F roach.rule -F gen_ai.request.model \
259+ -F roach.result -F roach.rule -F gen_ai.request.model -F gen_ai.response.model \
259260 -F ' sum(gen_ai.cost.total_tokens)' -F ' sum(gen_ai.usage.input_tokens)' \
260261 -F ' sum(gen_ai.usage.output_tokens)' -F ' count()'
261262```
0 commit comments