(type: string | undefined)
| 61 | * No-op when the feature flag is off. Unknown/missing types are bucketed as |
| 62 | * 'other' to keep label cardinality bounded. */ |
| 63 | export const recordSocketEmit = (type: string | undefined): void => { |
| 64 | if (!enabled()) return; |
| 65 | const label = type && KNOWN_TYPES.has(type) ? type : 'other'; |
| 66 | socketEmitsTotal.labels(label).inc(); |
| 67 | }; |
no test coverage detected