{"id":18616690,"url":"https://github.com/sile/rustracing","last_synced_at":"2025-04-06T06:09:05.374Z","repository":{"id":25981813,"uuid":"105934288","full_name":"sile/rustracing","owner":"sile","description":"OpenTracing API for Rust","archived":false,"fork":false,"pushed_at":"2024-06-15T06:30:15.000Z","size":95,"stargazers_count":62,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T04:09:21.358Z","etag":null,"topics":["opentracing","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-05T19:58:49.000Z","updated_at":"2025-01-23T05:51:10.000Z","dependencies_parsed_at":"2024-06-15T07:39:59.273Z","dependency_job_id":null,"html_url":"https://github.com/sile/rustracing","commit_stats":{"total_commits":96,"total_committers":7,"mean_commits":"13.714285714285714","dds":0.08333333333333337,"last_synced_commit":"08a44e2286faf847bce80e1646fc25064b54de58"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Frustracing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Frustracing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Frustracing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Frustracing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sile","download_url":"https://codeload.github.com/sile/rustracing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441052,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opentracing","rust"],"created_at":"2024-11-07T03:37:39.210Z","updated_at":"2025-04-06T06:09:05.353Z","avatar_url":"https://github.com/sile.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"rustracing\n==========\n\n[![Crates.io: rustracing](https://img.shields.io/crates/v/rustracing.svg)](https://crates.io/crates/rustracing)\n[![Documentation](https://docs.rs/rustracing/badge.svg)](https://docs.rs/rustracing)\n[![Actions Status](https://github.com/sile/rustracing/workflows/CI/badge.svg)](https://github.com/sile/rustracing/actions)\n[![Coverage Status](https://coveralls.io/repos/github/sile/rustracing/badge.svg?branch=master)](https://coveralls.io/github/sile/rustracing?branch=master)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n[OpenTracing] API for Rust.\n\n[Documentation](https://docs.rs/rustracing)\n\nExamples\n--------\n\n```rust\nuse rustracing::sampler::AllSampler;\nuse rustracing::tag::Tag;\nuse rustracing::Tracer;\nuse std::thread;\nuse std::time::Duration;\n\n// Creates a tracer\nlet (span_tx, span_rx) = crossbeam_channel::bounded(10);\nlet tracer = Tracer::with_sender(AllSampler, span_tx);\n{\n    // Starts \"parent\" span\n    let parent_span = tracer.span(\"parent\").start_with_state(());\n    thread::sleep(Duration::from_millis(10));\n    {\n        // Starts \"child\" span\n        let mut child_span = tracer\n            .span(\"child_span\")\n            .child_of(\u0026parent_span)\n            .tag(Tag::new(\"key\", \"value\"))\n            .start_with_state(());\n\n        child_span.log(|log| {\n            log.error().message(\"a log message\");\n        });\n    } // The \"child\" span dropped and will be sent to `span_rx`\n} // The \"parent\" span dropped and will be sent to `span_rx`\n\n// Outputs finished spans to the standard output\nwhile let Ok(span) = span_rx.try_recv() {\n    println!(\"# SPAN: {:?}\", span);\n}\n```\n\nAs an actual usage example of the crate and an implementation of the [OpenTracing] API,\nit may be helpful to looking at [rustracing_jaeger] crate.\n\nReferences\n----------\n\n- [The OpenTracing Semantic Specification (v1.1)][specification]\n\n[OpenTracing]: http://opentracing.io/\n[specification]: https://github.com/opentracing/specification/blob/master/specification.md\n[rustracing_jaeger]: https://github.com/sile/rustracing_jaeger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsile%2Frustracing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsile%2Frustracing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsile%2Frustracing/lists"}