WithTelemetry annotates err with the given telemetry key(s). The telemetry keys must be PII-free. Detail is shown: - via `errors.GetSafeDetails()`. - via `GetTelemetryKeys()` below. - when formatting with `%+v`. - in Sentry reports.
(err error, keys ...string)
| 25 | // - when formatting with `%+v`. |
| 26 | // - in Sentry reports. |
| 27 | func WithTelemetry(err error, keys ...string) error { |
| 28 | if err == nil { |
| 29 | return nil |
| 30 | } |
| 31 | |
| 32 | return &withTelemetry{cause: err, keys: keys} |
| 33 | } |
| 34 | |
| 35 | // GetTelemetryKeys retrieves the (de-duplicated) set of |
| 36 | // all telemetry keys present in the direct causal chain |
no outgoing calls
searching dependent graphs…