MCPcopy Index your code
hub / github.com/ether/etherpad / recordSocketEmit

Function recordSocketEmit

src/node/prom-instruments.ts:63–67  ·  view source on GitHub ↗
(type: string | undefined)

Source from the content-addressed store, hash-verified

61 * No-op when the feature flag is off. Unknown/missing types are bucketed as
62 * 'other' to keep label cardinality bounded. */
63export 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};

Callers 2

Calls 1

enabledFunction · 0.85

Tested by

no test coverage detected