{"id":36744657,"url":"https://github.com/emit-rs/emit","last_synced_at":"2026-02-12T11:53:47.906Z","repository":{"id":57624790,"uuid":"54075284","full_name":"emit-rs/emit","owner":"emit-rs","description":"Developer-first diagnostics for Rust applications","archived":false,"fork":false,"pushed_at":"2025-12-05T21:26:59.000Z","size":5283,"stargazers_count":170,"open_issues_count":11,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-07T14:41:43.899Z","etag":null,"topics":["logging","metrics","observability","rust","tracing"],"latest_commit_sha":null,"homepage":"https://emit-rs.io","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/emit-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2016-03-17T00:09:31.000Z","updated_at":"2025-12-05T21:26:48.000Z","dependencies_parsed_at":"2024-06-26T11:02:54.425Z","dependency_job_id":"7c4255dc-89b2-46c3-b548-856dc5dbbf0f","html_url":"https://github.com/emit-rs/emit","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/emit-rs/emit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emit-rs%2Femit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emit-rs%2Femit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emit-rs%2Femit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emit-rs%2Femit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emit-rs","download_url":"https://codeload.github.com/emit-rs/emit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emit-rs%2Femit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["logging","metrics","observability","rust","tracing"],"created_at":"2026-01-12T12:31:40.673Z","updated_at":"2026-02-12T11:53:47.897Z","avatar_url":"https://github.com/emit-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 style=\"display: flex; align-items: center\"\u003e\n\u003cimg style=\"display: inline\" height=\"80px\" width=\"80px\" src=\"https://raw.githubusercontent.com/emit-rs/emit/main/asset/logo.svg\" aria-hidden=\"true\"\u003e emit\n\u003c/h1\u003e\n\n[![all](https://github.com/emit-rs/emit/actions/workflows/all.yml/badge.svg)](https://github.com/emit-rs/emit/actions/workflows/all.yml)\n\n## Developer-first diagnostics for Rust applications\n\n`emit` is a stable, complete, and capable framework for adding structured diagnostics to your Rust applications with a simple, powerful data model and an expressive syntax inspired by [Message Templates](https://messagetemplates.org). `emit`'s guiding design principle is low ceremony, low cognitive-load.\n\nThis readme covers just enough to give you an idea of what `emit` is. For a proper treatment, see:\n\n- [the guide](https://emit-rs.io).\n- [a set of task-oriented examples](https://github.com/emit-rs/emit/tree/main/examples).\n- [the API docs](https://docs.rs/emit/1.17.2/emit/index.html).\n\n## Getting started\n\nAdd `emit` to your `Cargo.toml`:\n\n```toml\n[dependencies.emit]\nversion = \"1.17.2\"\n# Optional\nfeatures = [\"serde\"]\n\n# Optional\n[dependencies.emit_term]\nversion = \"1.17.2\"\n\n# Optional\n[dependencies.serde]\nversion = \"1\"\nfeatures = [\"derive\"]\n```\n\nInitialize `emit` in your `main.rs` and start peppering diagnostics throughout your application:\n\n```rust\nfn main() {\n    // Configure `emit` to write events to the console\n    let rt = emit::setup()\n        .emit_to(emit_term::stdout())\n        .init();\n\n    // Your app code goes here\n    {\n        // `emit` supports fully structured data\n        // See the `#[emit::as_serde]` attribute in our `greet` function below\n        #[derive(serde::Serialize)]\n        struct User\u003c'a\u003e {\n            id: u32,\n            name: \u0026'a str,\n        }\n\n        // Annotate functions with `#[emit::span]` to produce traces\n        #[emit::span(\"Greet {user}\", #[emit::as_serde] user)]\n        fn greet(user: \u0026User) {\n            // Use `emit::info` to produce log events\n            emit::info!(\"Hello, {user: user.name}!\");\n        }\n\n        greet(\u0026User { id: 1, name: \"Rust\" });\n    }\n\n    // Flush any remaining events before `main` returns\n    rt.blocking_flush(std::time::Duration::from_secs(5));\n}\n```\n\n![The output of running the above program](https://github.com/emit-rs/emit/blob/main/asset/emit_term.png?raw=true)\n\n`emit` has a capable syntax for writing events that's different from the standard `format!` trait. You can read more about it in [the guide](https://emit-rs.io/reference/templates.html).\n\n## Tracing\n\n`emit` can produce trace data that's compatible with OpenTelemetry and standard tracing tools, like Zipkin.\n\n![An example trace produced by `emit` in Zipkin](https://github.com/emit-rs/emit/blob/main/asset/trace-zipkin.png?raw=true)\n\nThe above screenshot was generated by [this example application](https://github.com/emit-rs/emit/tree/main/examples/trace_zipkin).\n\nSee [the guide](https://emit-rs.io/producing-events/tracing.html) for details.\n\n## Metrics\n\n`emit` can produce metric data that's compatible with OpenTelemetry and standard metric tools, like Prometheus.\n\n![An example metric produced by `emit` in Prometheus](https://github.com/emit-rs/emit/blob/main/asset/metric-prometheus.png?raw=true)\n\nThe above screenshot was generated by [this example application](https://github.com/emit-rs/emit/tree/main/examples/metric_prometheus).\n\nSee [the guide](https://emit-rs.io/producing-events/metrics.html) for details.\n\n## Quick debugging\n\n`emit` has a `dbg!` macro like the standard library's which you can use for quick-and-dirty debugging:\n\n```rust\n#[derive(Debug)]\npub struct User\u003c'a\u003e {\n    id: u32,\n    name: \u0026'a str,\n}\n\nemit::dbg!(\u0026User { id: 1, name: \"Rust\" });\n```\n\nSee [the guide](https://emit-rs.io/producing-events/quick-debugging.html) for details.\n\n## Stability\n\n`emit` has a complete and stable API that's suitable for production environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femit-rs%2Femit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femit-rs%2Femit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femit-rs%2Femit/lists"}