From 77467f1bd4aa69f4436edad75c11fc60b772fcb2 Mon Sep 17 00:00:00 2001 From: DJ Nelson Date: Mon, 20 Jul 2026 10:36:45 -0700 Subject: [PATCH] fix: include tenant ID when logging with JSON format --- src/runtime/runtime.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/runtime.ts b/src/runtime/runtime.ts index 379ee8e..419258c 100644 --- a/src/runtime/runtime.ts +++ b/src/runtime/runtime.ts @@ -67,6 +67,7 @@ export class Runtime { await this.runWithInvokeContext( context.awsRequestId, context.xRayTraceId, + context.tenantId, () => processor.processInvoke(context, event), ); } @@ -82,6 +83,7 @@ export class Runtime { await this.runWithInvokeContext( context.awsRequestId, context.xRayTraceId, + context.tenantId, () => processor.processInvoke(context, event), ); }); @@ -91,6 +93,7 @@ export class Runtime { private async runWithInvokeContext( requestId: string, xRayTraceId: string | undefined, + tenantId: string | undefined, fn: () => Promise, ): Promise { const invokeStore = await InvokeStore.getInstanceAsync(); @@ -98,6 +101,7 @@ export class Runtime { { [InvokeStoreBase.PROTECTED_KEYS.REQUEST_ID]: requestId, [InvokeStoreBase.PROTECTED_KEYS.X_RAY_TRACE_ID]: xRayTraceId, + [InvokeStoreBase.PROTECTED_KEYS.TENANT_ID]: tenantId, }, fn, );