Comments (4)
Hey @dtothefp . It looks like the error is because of some environment variables we usually read from the AWS sandbox that the serverless plugin's invoke environment doesn't provide. I think we might be able to address this at the serverless plugin level by disabling instrumentation when the invoke occurs. DataDog/serverless-plugin-datadog#63 We might be able to address both issues at once.
from datadog-lambda-js.
@DarcyRaynerDD your fix for serverless plugin fixed the problem references in that issue but I'm still seeing this on local invoke
{"status":"error","message":"datadog:api key not configured, see https://dtdg.co/sls-node-metrics"}
Do I need to update this lib as well?
from datadog-lambda-js.
Hi @dtothefp, that error message comes from this function, and is status: error
if the logForwarding config flag is false, and status: debug
if the flag is true. The reason for this is that the Datadog API key is not necessary if metrics are written to logs rather than sent directly to Datadog.
You should be able to enable writing the metrics to logs by setting the flushMetricsToLogs
serverless plugin config variable.
from datadog-lambda-js.
@sfirrin sorry for the late reply, for some reason I'm not receiving notifications for this issue 🤷♂️
This solution seems difficult to do because in my mind I would have to toggle the custom flushMetricsToLogs
based upon the condition of if the Lambda invocation is local invoke
or not which I don't think is possible in serverless.yml
. So it would be something like
custom:
datadog:
flushMetricsToLogs: # ternary for IS_LOCAL
from datadog-lambda-js.
Related Issues (20)
- "Cannot read properties of undefined (reading 'toString')" when calling getTraceHeaders() HOT 2
- Getting 413 from Datadog when sending metrics HOT 3
- AWS Cloudformation Transform macro is adding two datadog layers , my deployment is running out due to codesize issue for lambda with these two layers HOT 5
- Layer versions >104 not available in eu-north-1 HOT 3
- CustomTraceExtractor does not work as expected HOT 11
- CustomTraceExtractor does not work as expected HOT 1
- CustomTraceExtractor does not work as expected HOT 1
- Version 8.107.0 seems to be broken HOT 2
- datadog: handler not initialized HOT 3
- LICENSE-3rdparty.csv should be updated HOT 2
- Documentation request | Add a CHANGELOG to the root of the project for automated dependencies to pick up the changes HOT 4
- Lambd sendDistributionMetrics - datadog:handler not initialized HOT 7
- Error while testing handler wrapper by datadog() HOT 1
- Sending timer metrics HOT 2
- Circular references are not handled in tag-object when trying to serialize Lambda's response HOT 2
- sendDistributionMetricWithDate no longer including tags HOT 2
- Lambda init failure with Nodejs 20.x version upgrade HOT 7
- isBatchItemFailure fails when lambda response is null HOT 1
- [Feature Request] Add Support for ca-west-1 region HOT 2
- Release layer versions as GitHub releases HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datadog-lambda-js.