-
Notifications
You must be signed in to change notification settings - Fork 58
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
Connection error on auto-flush within serverless lambda #116
Comments
Are these errors you’re printing and formatting yourself using the These do appear similar to the errors in that dd-trace issue, and dd-trace is at least involved here (although that may only be because it is instrumenting all the HTTP calls, and it could have nothing to do with the error itself). Are you intentionally using dd-trace as well as this library? (This package doesn’t use dd-trace and none of its dependencies should either; just trying to understand how that’s getting involved.) If you want to work around the actual HTTP stuff here (which calls down through DataDog’s official implementation), you can provide a custom |
@Mr0grog --
|
Hmm, is the stack trace in your issue description being generated client side, but showing an error that's coming from the server, then? (So: you're making a request to your server, and your server responds with an error because it failed to log metrics, and then the client is logging the error message from the server along with a stack from the client for where the error was received?) Otherwise you've probably got some configuration or build issues, since dd-trace is showing up in your stack trace, which implies it is being used on the server where the error is happening. Either way, are you able to put together some kind of simplified case I or one of the other maintainers here can test in Lambda ourselves? |
I tried calling the API directly to see if that would perhaps work around the issue. However I'm getting the same error on some of the calls, not all calls are throwing an error, only some of my webhook handler lambdas seem to throw this error. I don't think dd-trace is in this stack:
I'll see if I can develop a simplified case which fails consistently, this may be a bit tricky though. |
dd-trace is in the 3rd and 6th frames from the top of the stack (wrapping
This would be super helpful. If it’s intermittent, my first guess at causes would be one of two things:
|
I'm getting errors when calling datadog metrics when running within the AWS serverless lambda environment. These errors seem very similar to the ones reported for dd-trace here.
This is the error I'm seeing:
I've tried turning off auto-flush by setting the flush interval to 0.
I also tried calling
flush()
manually every time I emit metrics.I continue to get the same errors.
I plan to attempt to work around the npm plugin and call the datadog metrics api endpoint directly, any help with that would be appreciated!
The text was updated successfully, but these errors were encountered: