dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

ERROR "Could not notify the extension"

Open necosta opened this issue 1 year ago • 3 comments

Seeing error:

ERROR datadog.trace.lambda.LambdaHandler - could not notify the extension as the lambda span is null or no sampling priority has been found

continuously showing on Datadog live filter. Note that it does not seem to have side effects (we see tracing, spans, ...), but given its logged as ERROR, a deeper investigation would be appreciated.

Version:

  • dd-trace-java -> v1.27.0
  • datadog-lambda-extension -> v52
  • java -> v17

References:

  • Previously mentioned on https://github.com/DataDog/dd-trace-java/issues/4637
  • Mentioned on https://help.datadoghq.com/hc/en-us/requests/1407935
  • Mentioned on https://help.datadoghq.com/hc/en-us/requests/1439630

necosta avatar Jan 18 '24 13:01 necosta

Hey @necosta, thanks for reaching us out – I'm from the Serverless APM team.

I'll make sure to track this with our team so we can do a more deep research and reproduce it.

In the meantime, would it be possible for you to share more information how you set up your Java handler? You don't have to share any sensitive information. Anything that could help us get this same set up would be appreciated.

Thanks in advance!

duncanista avatar Jan 18 '24 19:01 duncanista

Sure @duncanista , we have a simple setup with:

  • Base docker image lambda/java:17 (https://gallery.ecr.aws/lambda/java),
  • datadog/lambda-extension:52 (https://gallery.ecr.aws/datadog/lambda-extension), /opt folder contents (COPY --from=public.ecr.aws/datadog/lambda-extension:52 /opt/. /opt/)
  • version 1.27.0 dd-java-agent.jar (from https://github.com/DataDog/dd-trace-java/releases) jar saved as /opt/java/lib/dd-java-agent.jar
  • And env variables:
    "AWS_LAMBDA_EXEC_WRAPPER"    -> "/opt/datadog_wrapper",
    "DD_SITE"                    -> "datadoghq.com",
    "DD_PROFILING_ENABLED"       -> "true",
    "DD_TRACE_PROPAGATION_STYLE" -> "datadog,b3multi"

necosta avatar Jan 23 '24 14:01 necosta

Also tested with java agent version 1.28.0-RC3, same outcome.

necosta avatar Jan 23 '24 15:01 necosta