-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lambd sendDistributionMetrics - datadog:handler not initialized #535
Comments
Hi @DanielScharfsteinGit, do you mind upgrading your version of |
@purple4reina Hey! Im using the newest - 8.108.0 version. Adding that I'm not using the datadog() function from the datadog-lambda-js package but only use the layer. When adding the datadog() it is working. But I looked online and saw examples of using the metrics without the need of the datadog(). |
Hey @DanielScharfsteinGit, could you share the example you are mentioning?
|
Hello @duncanista, On this page - https://docs.datadoghq.com/serverless/aws_lambda/metrics/#submit-custom-metrics, it appears that if you use the Datadog Lambda layer—which includes instrumentation and ensures tracing works—you might not need to directly invoke the datadog() function. My code snippet below, which sends custom metrics, is incorporated directly into the handler:
|
The instructions assume that you have Serverless Intrumentation set:
Which, depending on your instrumentation of choice, most of them directly end up using the How are you instrumenting your AWS Lambda? |
Hey, I'm going to close this issue since there hasn't been a response in a week, and the underlying problem should be solved by instrumenting the AWS Lambda function – since the methods expect it to be eventually executed. If there's any other questions/concerns, please feel free to re-open! |
Expected Behavior
Custom metrics should be added using the sendDistributionMetric function.
Actual Behavior
An error is encountered: {"status":"error","message":"datadog:handler not initialized"}.
Steps to Reproduce the Problem
Attempted Solutions
I reviewed the following issues on GitHub (#298, #209, #369), but was unable to resolve the issue.
Specifications
The text was updated successfully, but these errors were encountered: