mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 11:20:37 +09:00
Add plugin telemetry bridge capability
Expose telemetry.track through the plugin SDK and server host bridge, forward plugin-prefixed events into the shared telemetry client, and demonstrate the capability in the kitchen sink example.\n\nCo-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
53dbcd185e
commit
af844b778e
14 changed files with 209 additions and 1 deletions
|
|
@ -793,6 +793,15 @@ export function startWorkerRpcHost(options: WorkerRpcHostOptions): WorkerRpcHost
|
|||
},
|
||||
},
|
||||
|
||||
telemetry: {
|
||||
async track(
|
||||
eventName: string,
|
||||
dimensions?: Record<string, string | number | boolean>,
|
||||
): Promise<void> {
|
||||
await callHost("telemetry.track", { eventName, dimensions });
|
||||
},
|
||||
},
|
||||
|
||||
logger: {
|
||||
info(message: string, meta?: Record<string, unknown>): void {
|
||||
notifyHost("log", { level: "info", message, meta });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue