diff --git a/packages/stream-metadata/src/environment.ts b/packages/stream-metadata/src/environment.ts index 732feb6ab..dd461beb5 100644 --- a/packages/stream-metadata/src/environment.ts +++ b/packages/stream-metadata/src/environment.ts @@ -1,6 +1,7 @@ import * as dotenv from 'dotenv' import { getWeb3Deployment } from '@river-build/web3' import { z } from 'zod' +import { v4 } from 'uuid' dotenv.config({ path: ['.env', '.env.local'], @@ -52,6 +53,10 @@ function makeConfig() { pretty: envMain.LOG_PRETTY, }, aws: envAws?.success ? envAws.data : undefined, + instance: { + id: v4(), + deployedAt: new Date().toISOString(), + }, } } diff --git a/packages/stream-metadata/src/logger.ts b/packages/stream-metadata/src/logger.ts index b19463d8d..28bc8beb2 100644 --- a/packages/stream-metadata/src/logger.ts +++ b/packages/stream-metadata/src/logger.ts @@ -18,5 +18,5 @@ const pinoOptions: LoggerOptions = { const baseLogger = pino(pinoOptions) export function getLogger(name: string, meta: Record = {}) { - return baseLogger.child({ name, ...meta }) + return baseLogger.child({ name, instance: config.instance, ...meta }) }