Commit 41977f3
feat(seer): Send referrer 'api.cli' on autofix API calls (#965)
Add `referrer: "api.cli"` to the POST body for both
`triggerRootCauseAnalysis` and `triggerSolutionPlanning` so the Sentry
backend can attribute autofix runs triggered from the CLI.
### Context
- getsentry/sentry#115497 adds an optional `referrer` field to
`GroupAutofixEndpoint`
- getsentry/sentry#115514 registers the `CLI = "api.cli"` enum value on
`AutofixReferrer`
This PR is the CLI-side counterpart: it sends the `api.cli` referrer
string on every autofix POST so downstream analytics and Seer can
identify CLI-initiated runs.
### Changes
- **`src/lib/api/seer.ts`** — add `referrer: "api.cli"` to the request
body in `triggerRootCauseAnalysis` and `triggerSolutionPlanning`
- **`test/lib/api-client.seer.test.ts`** — update body assertions to
expect the new field
Co-authored-by: Junior <junior[bot]@sentry.io>1 parent 2e8fec5 commit 41977f3
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
0 commit comments