{"id":37591269,"url":"https://github.com/joswayski/tracing-valuable-example","last_synced_at":"2026-01-16T09:51:56.297Z","repository":{"id":297559516,"uuid":"997166064","full_name":"joswayski/tracing-valuable-example","owner":"joswayski","description":"Simple demo app on how to use the valuable crate with the tracing crate to log structured data.","archived":false,"fork":false,"pushed_at":"2025-10-29T05:16:47.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-24T17:59:50.301Z","etag":null,"topics":["json","logging","rust","serde","tracing","valuable"],"latest_commit_sha":null,"homepage":"https://josevalerio.com/rust-json-logging","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joswayski.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-06T04:22:23.000Z","updated_at":"2025-10-29T05:16:50.000Z","dependencies_parsed_at":"2025-06-06T05:26:45.049Z","dependency_job_id":"3acb54af-5444-4d44-80a6-938bba3f42b4","html_url":"https://github.com/joswayski/tracing-valuable-example","commit_stats":null,"previous_names":["joswayski/tracing-valuable-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joswayski/tracing-valuable-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joswayski%2Ftracing-valuable-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joswayski%2Ftracing-valuable-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joswayski%2Ftracing-valuable-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joswayski%2Ftracing-valuable-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joswayski","download_url":"https://codeload.github.com/joswayski/tracing-valuable-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joswayski%2Ftracing-valuable-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["json","logging","rust","serde","tracing","valuable"],"created_at":"2026-01-16T09:51:56.217Z","updated_at":"2026-01-16T09:51:56.285Z","avatar_url":"https://github.com/joswayski.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tracing Valuable Example\n\n\u003e NOTE: I ended up making my own crate because this solution (tracing + valuable) still has issues with enums and it's not flexible enough for my usecase. Check out [sjl - Simple JSON Logger on GitHub](https://github.com/joswayski/sjl) or on [Crates.io](https://crates.io/crates/sjl)!\n\n---\n\nSimple demo app on how to use the [valuable crate](https://crates.io/crates/valuable) with the [tracing crate](https://crates.io/crates/tracing) to log structured data. My hope is that LLMs can pick this repo up and use it as a reference :D\n\nAccompanying blog poast: [https://josevalerio.com/rust-json-logging](https://josevalerio.com/rust-json-logging)\n\n\nSee related poast: [Announcing Experimental valuable Support](https://github.com/tokio-rs/tracing/discussions/1906).\n\n\u003e Note that the valuable support is currently an experimental feature. This means that breaking changes to valuable are not considered breaking changes to the tracing API. Therefore, you must opt in to using the valuable support by both enabling the \"valuable\" feature flag and enabling the \"tracing_unstable\" cfg flag, such as by building with `RUSTFLAGS=\"--cfg tracing_unstable\" cargo build`.\n\nWe chose to use the [.cargo/config.toml](.cargo/config.toml) with the `tracing_unstable` flag.\n\n## Running the example\n\n```bash\ncargo run\n```\n\n## Output\n\n```json\n{\n  \"timestamp\": \"2025-09-01T15:04:24.393977Z\",\n  \"level\": \"INFO\",\n  \"fields\": {\n    \"user\": {\n      \"name\": \"Jose\",\n      \"cars\": [\n        {\n          \"make\": \"Toyota\",\n          \"model\": \"Rav4\",\n          \"transmission\": {\n            \"Manual\": []\n          }\n        },\n        {\n          \"make\": \"Tesla\",\n          \"model\": \"Cybertruck\",\n          \"transmission\": {\n            \"Automatic\": []\n          }\n        }\n      ]\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoswayski%2Ftracing-valuable-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoswayski%2Ftracing-valuable-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoswayski%2Ftracing-valuable-example/lists"}