Giter VIP home page Giter VIP logo

Comments (5)

BrynCooke avatar BrynCooke commented on June 19, 2024 1

That would be great. Make sure to add some sort of test.
I think it's OK to strip dashes out as it's not as if we can use anything with dashes in.

from router.

BrynCooke avatar BrynCooke commented on June 19, 2024

Hi @kindermax,
I'm afraid that what you are trying to do can't possibly work. Extracting the trace ID and constructing the root span is necessarily the first thing that should happen in the router. (There are some things that happen before but we are working to fix this).

I think we would accept a PR that simply strips out dashes in CustomTraceIdPropagator.
Alternatively is this driven by use of AWS X-ray? If you can use a standard propagator and trace_id format it would be prefereable.

from router.

kindermax avatar kindermax commented on June 19, 2024

Hi, unfortunately in my case uuid4 x-request-id is a company standard and generated by our nginx so I can not change its format.
I think stripping dashes in CustomTraceIdPropagator would be enough in my case since I just need its value in my logs. Then I can do the reverse thing (adding dashes again) in my log processor.
If you ok with it, I can try to make a pr

from router.

abernix avatar abernix commented on June 19, 2024

@kindermax Do you think that the PR #5071 will resolve this satisfactorily?

from router.

kindermax avatar kindermax commented on June 19, 2024

@abernix well, partially yes. If I put a log processor after router like this router | log_processor, then I will be able to restore original trace_id. Sure it wont work if the original trace_id were without dashes, because I will add dashes when I shouldn't. Alternatively, if there was a way just to add my header value to some field in logs (its a paid feature as far as i know) I would be able to just extract it in log processor.

from router.

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.