-
Notifications
You must be signed in to change notification settings - Fork 95
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
Lambda exiting before sending telemetry data #17
Comments
Hi @dhenard - can you confirm the span processor you are using is the If you happen to be using the |
Sorry I noticed our docs are incorrectly using If you can try the |
Hey @anuraaga - Thanks for looking into this, I was using the SimpleSpanProcessor but will give the BatchSpanProcessor a go. BatchSpanProcessor is working without the need for a delay. |
@dhenard Excellent, glad to hear that! Let me close this issue and feel free to post again if anything comes up. |
Snippet of main handler with delay added to give the function time to send the data is below. Without the delay at the end it would not send the data more than it would. Everything works with the delay but would rather not incur the extra cost of the 400ms per function call.
I have a separate file in the project that creates the tracer. Any suggestions on how to get this functioning without the delay would be appreciated.
` const { tracing } = require('./tracing');
exports.handler = async(event, context) => {
const delay = 400;
const tracer = tracing;
const span = tracer.startSpan('POS Request');
context.callbackWaitsForEmptyEventLoop = true;
let rslt = '';
}; `
The text was updated successfully, but these errors were encountered: