MCPcopy Create free account
hub / github.com/hashintel/hash / identifyActor

Method identifyActor

apps/hash-api/src/telemetry/telemetry.ts:190–202  ·  view source on GitHub ↗

Associate an actor with traits (e.g. on registration).

(actor: TelemetryActor, traits: Record<string, unknown>)

Source from the content-addressed store, hash-verified

188
189 /** Associate an actor with traits (e.g. on registration). */
190 identifyActor(actor: TelemetryActor, traits: Record<string, unknown>): void {
191 const client = this.getClient();
192 if (!client) {
193 return;
194 }
195 client.identify({
196 userId: actor.accountId,
197 traits,
198 context: {
199 app: { environment: telemetryEnvironment, frontendDomain },
200 },
201 } as unknown as RudderAnalytics.IdentifyParams);
202 }
203
204 /** Flush buffered events; call on graceful shutdown. */
205 async flush(): Promise<void> {

Callers 1

Calls 1

getClientMethod · 0.95

Tested by

no test coverage detected