Closed HannesBBR closed 3 years ago
Hello @HannesBBR
Thanks for trying our experimental feature. Tracing with go + extension is not yet available and not supported officially, but will be soon :)
According to the behaviour you described, it may come from the runtime you're using in your lambda. I suspect you're using go1.x
which is not a supported runtime by AWS. You may want to switch to Custom runtime on Amazon Linux 2 ( provided. al2 )
.
Hi Maxime!
Thanks a lot for your quick response! Just after we created the issue we read the same thing in the lambda extension docs. We now see that the agent is running, and get a debug message saying that the package will use the agent.
Unfortunately it seems that our handler function (which we wrap with lambda.Start(ddlambda.WrapHandler(processSQSEvent, nil))
) is no longer being called. We're sure WrapHandler
is being called because of the debug message Will use the Serverless Agent
, but it seems the actual invocation of our own handler is no longer happening.
We of course understand you're not officially supporting this yet, but of course any pointers you could give are highly appreciated (perhaps you ran against the same issue).
EDIT: Apparently we were running an older version of the dd-go-lambda package, updating that solved the issue. Thanks a lot!
@HannesBBR Are you using the most recent version of "github.com/aws/aws-lambda-go"?
Expected Behavior
We are trying to set up distributed tracing, where a Golang lambda is the entrypoint of our flow that we want to trace. We want to use the lambda extension, and are using the
datadog-lambda-go
package pointing to themaxday/support-tracing-with-extension
branch of @maxday.The expected behaviour would be that the package notices that the extension is installed, and that it can do a '/hello' call, so that afterwards the dd-lambda-go package can send traces towards the agent, instead of printing them to stdout for the log forwarder to use.
Actual Behavior
We receive the following debug message:
"Will use the API since the Serverless Agent was detected but the hello route was unreachable".
This means that the package correctly detects that the extension is present, but that it doesn't get a 200 OK response from the
/hello
endpoint of the extension. When we do some debugging ourselves in the lambda, we get a connection refused when trying to queryhttp://localhost:8124/lambda/hello
, which explains the debug message.We were wondering, since @maxday seemed to get it working, if there was something specific for the Golang runtime we need to do, to get this setup working. Based on the documentation of extensions, it should automatically run as a separate process, so not sure what we are doing wrong.
Thanks in advance for any insights!
Steps to Reproduce the Problem
Specifications
Stacktrace