MCPcopy Create free account
hub / github.com/cockroachdb/errors / WithTelemetry

Function WithTelemetry

telemetrykeys/telemetrykeys.go:27–33  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

25// - when formatting with `%+v`.
26// - in Sentry reports.
27func 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

Callers 4

WithTelemetryFunction · 0.92
datadriven_test.goFile · 0.92
TestTelemetryFunction · 0.92
TestFormatFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestTelemetryFunction · 0.74
TestFormatFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…