( telemetry: TelemetryClient, defaults: TelemetryProperties, )
| 26 | } |
| 27 | |
| 28 | export function withTelemetryProperties( |
| 29 | telemetry: TelemetryClient, |
| 30 | defaults: TelemetryProperties, |
| 31 | ): TelemetryClient { |
| 32 | return { |
| 33 | track(event, properties) { |
| 34 | telemetry.track(event, { ...defaults, ...properties }); |
| 35 | }, |
| 36 | withContext(patch) { |
| 37 | return withTelemetryProperties(withTelemetryContext(telemetry, patch), defaults); |
| 38 | }, |
| 39 | setContext(patch) { |
| 40 | telemetry.setContext?.(patch); |
| 41 | }, |
| 42 | }; |
| 43 | } |
no outgoing calls
no test coverage detected