Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more descriptions about "tracing" #109

Open
breezewish opened this issue Mar 8, 2022 · 1 comment
Open

Add more descriptions about "tracing" #109

breezewish opened this issue Mar 8, 2022 · 1 comment

Comments

@breezewish
Copy link
Member

Currently this library lacks basic description about what is the "tracing" we would like to solve. It is not friendly for wild people that accidentally discovered this library, for example, from TiKV and its friend repositories.

A nice example would be https://tracing-rs.netlify.app/tracing/ where core concepts are explained in detail.

@taqtiqa-mark
Copy link
Contributor

taqtiqa-mark commented Mar 30, 2022

Hopefully we can keep it very simple - the tracing crate world is crate spaghetti.
From my PoV.

  • Reporters just plugin and work (hopefully my #[trace] macro work will mean this, in the fullness of time, becomes:
    #[trace[root=true, recurse=public, reporter=Jaeger]
    fn main(){
        fn hi(){
            println!("your un-traced code here");
        }
        pub fn world(){
            hello();
            println!("world");
            pub fn hello() {
                println!("Hello");
            }
        }
        // etc.
       world();
    }
    // Hello 
    // world
  • Then:
    • Start Jaeger: podman run -d ....
    • Run your traced app: cargo run
    • Visit the Jaeger page to see your trace: firefox http://localhost:1681
  • The public API, from my PoV, is (tracing crate compatible):
    • <s>.record("key","value");
  • Everything else is considered internal implementation details and subject to change at any instant.
  • There are no constraints/limitations we impose on the levels of tracing your app can have, and how you name them. An ./example/levels crate that implements log/tracing style levels via cargo features should suffice.

All that said I think we can keep this to a one pager for the "...wild people that accidentally discovered this library".

I certainly struggled to figure out some basics, but it has been worth it so far :)
Hopefully we can improve things for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants