Git Product home page Git Product logo

Comments (9)

anuraaga avatar anuraaga commented on July 24, 2024

@michaelhyatt Are you using AWS X-Ray as the backend for tracing? If not, then can you make sure active tracing is disabled for your Lambdas? The lambda instrumentation will extract the parent from the traceparent header only if active tracing is disabled. If you're not using X-Ray, then you should have no need to enable active tracing on Lambda functions.

If you are using AWS X-Ray, then because currently AWS does not support traceparent header for propagation (we are working on support for this now), you cannot use it and should use the default xray propagator setup by the aws-otel-lambda layer.

from aws-otel-lambda.

michaelhyatt avatar michaelhyatt commented on July 24, 2024

@anuraaga I am not using X-Ray, but when I am switching it off, all the traces appear as non-sampled and I am not seeing any traces generated:

Traceparent header that is received by the producer lambda with 00 indicating no sampling.

        "traceparent": "00-60e6ac5a4a2a3d036d789ca833fc13aa-54a6f39fe0a24cbc-00",

What am I missing to get the sampling turned on?

from aws-otel-lambda.

anuraaga avatar anuraaga commented on July 24, 2024

Thanks @michaelhyatt - it seems to be a bug in the instrumentation that prevents a lambda from starting a trace, I have filed #118 to fix it.

However, I noticed that in the logs you showed the span in consumer seems to have a Parent ID - does it mean requests to consumer include a traceparent? If so, then even now as long as X-Ray is disabled, the sampling decision of that header should be respected.

from aws-otel-lambda.

michaelhyatt avatar michaelhyatt commented on July 24, 2024

@anuraaga I am not sending a traceparent header myself, this is most likely inserted by X-Ray since my first example had Active tracing turned on.

from aws-otel-lambda.

michaelhyatt avatar michaelhyatt commented on July 24, 2024

@anuraaga forgot to answer your original question. No, I am not injecting any external traceparent headers, I was asking about forcing sampling on in the code itself. Will have to dig around for examples, but if you have one, please post it here.

from aws-otel-lambda.

anuraaga avatar anuraaga commented on July 24, 2024

@michaelhyatt Ah yeah that would explain it. So once the bug is fixed it should be ok without any special configuration. Unfortunately I'm not aware of a good workaround in the meantime unless you create your own span without a parent.

from aws-otel-lambda.

michaelhyatt avatar michaelhyatt commented on July 24, 2024

@anuraaga can confirm that injecting my own traceparent sampled: true and Active tracing switched off produces an end to end span with correctly populated parents.

from aws-otel-lambda.

github-actions avatar github-actions commented on July 24, 2024

This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled

from aws-otel-lambda.

github-actions avatar github-actions commented on July 24, 2024

This issue was closed because it has been marked as stale for 30 days with no activity.

from aws-otel-lambda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.