Skip to content

v1.0.2

Compare
Choose a tag to compare
@mobsense mobsense released this 27 Dec 05:09
· 27 commits to main since this release

Minor Feature Release

Features / Changes

  • Add the addTraceIDs API

Fixes

  • none

Correlation Trace IDs

If you are using AWS Lambda, SenseLogs supports the propagation of trace IDs by simply passing in the lambda event and context parameters. SenseLogs will extract the API Gateway requestId, Lambda requestId and X-Ray trace ID.

log.addTraceIds(event, context)

SenseLogs will map these IDs to a uniform x-correlation-NAME SenseLogs context variables. The following variables are supported:

x-correlation-api — API Gateway requestId
x-correlation-lambda — Lambda requestId
x-correlation-trace — X-Ray X-Amzn-Trace-Id header
x-correlation-extended — AWS extended request ID

SenseLogs will define a special variable 'x-correlation-id' that can be used as a stable request ID. It will be initialized to the value of the X-Correlation-ID header or if not defined, SenseLogs will use (in order) API Gateway request or X-Ray trace ID.

See