GithubHelp home page GithubHelp logo

Comments (4)

yaahc avatar yaahc commented on August 27, 2024

if you're not compiling with an error layer it's probably safe to just disable all the tracing support with default-features = false. that should hopefully disable the warning

from color-eyre.

Mythra avatar Mythra commented on August 27, 2024

Thanks, it's good to know it is a compile time flag. Unfortunately the problem is I do want span traces some of the time, and ideally I'd like to distribute it to users as such (right now I've been adding it if RUST_BACKTRACE or RUST_LIB_BACKTRACE is present in the environment).

There are some cases where it is incredibly useful, just not the default. I can imagine a couple issues where I might ask a user for a span trace, but in the case of the example above (a user typo'd a piece of config) it's just not useful there?

from color-eyre.

yaahc avatar yaahc commented on August 27, 2024

Oh okay. I think the solution is just to add some check of an env variable before capturing SpanTraces when constructing Reports. If the error layer isn't setup but the SpanTrace is None it should skip printing the warning.

I think I'd still prefer to default to capturing SpanTraces, so it would only not capture them if the RUST_SPANTRACE variable is defined and set to 0. You would need to explicitly check if the variable is unset on startup and set it to 0 with std::env::set_var, would this work for you?

from color-eyre.

Mythra avatar Mythra commented on August 27, 2024

Yep! That'd be more than fine.

from color-eyre.

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.