Skip to content

aws.lambda.load Span Duration Inflated with Provisioned Concurrency #723

@ClementDBS

Description

@ClementDBS

The aws.lambda.load span shows massively inflated durations on cold starts when using AWS Lambda provisioned concurrency.

Test Results:

  1. Deployed the Lambda function with provisioned concurrency
  2. Invoke for the first time (cold start)
  3. Result exemple:
    • aws.lambda (cold start span): 6 seconds
    • aws.lambda.load span: 19 minutes 41 seconds

Affected Spans

Only the aws.lambda.load span is affected.
The main aws.lambda cold start span correctly shows 6 seconds. Warm start invocations show ~8 seconds and have no aws.lambda.load span.

Environment

  • dd-trace version: 5.73.0
  • datadog-cdk-constructs-v2: 3.2.2
  • Node.js version: 22.x
  • AWS Lambda Runtime: Node.js with provisioned concurrency enabled
  • Datadog Lambda Extension: Layer version 92

Questions

  1. Is this the expected behavior or a bug?
  2. Are there any recommended approaches for handling trace context in long-lived Lambda environments with provisioned concurrency?
  3. Should dd-trace handle this case automatically?

Thank you!

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions