Skip to content

Commit ecdbeef

Browse files
feat(LLMO-1023): integrate logWrapper for trace ID logging
- Add logWrapper import and to wrapper chain after authWrapper - Replace context.log with context.contextualLog throughout - Update controller instantiations to use contextualLog - Logs will now include AWS X-Ray trace IDs automatically
1 parent 63293d1 commit ecdbeef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
elevatedSlackClientWrapper,
3333
SLACK_TARGETS,
3434
} from '@adobe/spacecat-shared-slack-client';
35-
import { hasText, resolveSecretsName } from '@adobe/spacecat-shared-utils';
35+
import { hasText, resolveSecretsName, logWrapper } from '@adobe/spacecat-shared-utils';
3636

3737
import sqs from './support/sqs.js';
3838
import getRouteHandlers from './routes/index.js';
@@ -204,6 +204,7 @@ export const main = wrap(run)
204204
.with(authWrapper, {
205205
authHandlers: [JwtHandler, AdobeImsHandler, ScopedApiKeyHandler, LegacyApiKeyHandler],
206206
})
207+
.with(logWrapper)
207208
.with(dataAccess)
208209
.with(bodyData)
209210
.with(multipartFormData)

0 commit comments

Comments
 (0)