Skip to content
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

ability to configure the tracer http timeout or at least add documentation on how to do it if it already exists #188

Open
acsecureworks opened this issue Feb 14, 2025 · 4 comments

Comments

@acsecureworks
Copy link

Expected Behavior

there should be an ENV variable to configure the http timeout.

DD_TRACE_HTTP_TIMEOUT

Actual Behavior

I don't see a clear/obvious way to the set the http timeout. I might very well have not looked deep enough and it already exists so if it does, please provide documentation and an example would be great

@purple4reina
Copy link
Contributor

Hi @acsecureworks thanks for reaching out! Help me understand, are you looking to add the WithAgentTimeout option to your tracer?

I'm also curious to learn more about what problem you are hoping to solve.

@acsecureworks
Copy link
Author

yes,

I am seeing traces for my app but I am also seeing errors in my datadog logs like

2025/02/14 19:18:44 Datadog Tracer v1.65.1 ERROR: lost 2 traces: Post "http://foo.datadoghq.com:8126/v0.4/traces": context deadline exceeded (Client.Timeout exceeded while awaiting headers), 11 additional messages skipped (first occurrence: 14 Feb 25 19:17 UTC)

I'm thinking if I increase that timeout, I can reduce these errors

@purple4reina
Copy link
Contributor

Hmm, that's really curious. The tracer should not be attempting to post traces directly to intake, they should always be going through the Datadog Lambda Extension.

Can you share a bit more about your setup and configuration? Which layers do you have installed? What environment variables do you have set?

@acsecureworks
Copy link
Author

I believe a figure this out

lambda.Start(ddlambda.WrapFunction(HandleRequest, &ddlambda.Config{
	TracerOptions: []tracer.StartOption{
		tracer.WithAgentTimeout(30),
	},
}))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants