Skip to content

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

Open

Description

@acsecureworks

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

Activity

  1. purple4reina commented on Feb 14, 2025

    @purple4reina
    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.

  2. acsecureworks commented on Feb 14, 2025

    @acsecureworks
    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

  3. purple4reina commented on Feb 18, 2025

    @purple4reina
    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?

  4. acsecureworks commented on Feb 20, 2025

    @acsecureworks
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions