MCPcopy Index your code
hub / github.com/cli/cli / WithAdditionalCommonDimensions

Function WithAdditionalCommonDimensions

internal/telemetry/telemetry.go:155–159  ·  view source on GitHub ↗

WithAdditionalCommonDimensions allows setting additional common dimensions that will be included with every telemetry event recorded by the service.

(dimensions ghtelemetry.Dimensions)

Source from the content-addressed store, hash-verified

153
154// WithAdditionalCommonDimensions allows setting additional common dimensions that will be included with every telemetry event recorded by the service.
155func WithAdditionalCommonDimensions(dimensions ghtelemetry.Dimensions) telemetryServiceOption {
156 return func(s *telemetryServiceOpts) {
157 maps.Copy(s.additionalDimensions, dimensions)
158 }
159}
160
161// WithSampleRate allows setting a sample rate (0-100) for telemetry events. Events recorded with the Unsampled option will be sent regardless of the sample rate.
162// Sampling is based on invocation ID, so an entire invocation will be included or excluded as a whole. This ensures that related events are not split between sampled and unsampled,

Callers 2

MainFunction · 0.92

Calls 1

CopyMethod · 0.45

Tested by 1