Giter VIP home page Giter VIP logo

Comments (7)

wereii avatar wereii commented on June 17, 2024

You might already be aware of this but I couldn't find any note or discussion, so this is here at least for posterity's sake.

I do wonder though why it even compiled, would have expected this to pop up sooner (but I don't know anything about tokio or rustflags).

from lemmy.

Nutomic avatar Nutomic commented on June 17, 2024

Right you need to set the mentioned env var, Im adding a comment. Here the documentation.

from lemmy.

wereii avatar wereii commented on June 17, 2024

Yeah, I also added RUSTFLAGS= (empty by default) into the Dockerfile so that this can be propagated from build-args, I could PR that if you want.

from lemmy.

Nutomic avatar Nutomic commented on June 17, 2024

Yes sure.

from lemmy.

asonix avatar asonix commented on June 17, 2024

fwiw putting the opentelemetry stuff behind the console feature doesn't make a lot of sense. Even though they both rely on tracing, they are different things and serve different purposes

from lemmy.

wereii avatar wereii commented on June 17, 2024

have been digging into this whole thing for last few hours and there seem to be two other problems (I might be blind though):

Minor thing: when enabling OTLP tracing, you have to set RUST_LOG to more verbose values as it also filters out what is sent to the trace consumer (jaeger), this in turn makes console output too verbose (with stuff that I am already getting in the consumer).
Adding some kind of opentelemetry_log field into the config to control this separately would be nice.
The code in question.

Bigger thing: HTTP Tracing across services does not work.
The incoming trace_id is ignored (proxy sets uber-trace-id header, https://docs.rs/tracing-actix-web/latest/tracing_actix_web/#trace-id, not yet sure how to apply this in root_span_builder - for now I just enabled "tracing-actix-web/opentelemetry_0_16" feature, I am probably missing something).
Requests to pict-rs should also pass the trace id, haven't checked it yet but jaeger does not show connections between lemmy and pict-rs so it's probably also not configured in reqwest(-tracing) (?)

EDIT: I wasn't able to resolve the above issue with trace_ids. The problem is definitely somewhere in

fn on_request_start(request: &actix_web::dev::ServiceRequest) -> Span {

Using tracing::info_span instead of tracing_actix_web::root_span does not handle extracting trace_id (?) but multiple ways to include it in the span did not work, at one moment it worked for requests to pict-rs (could trace requests from traefik load balancer linked to them) but not for lemmy itself, bummer.

from lemmy.

Nutomic avatar Nutomic commented on June 17, 2024

Im not familiar with any of this stuff, improvements welcome!

from lemmy.

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.