{"id":20315537,"url":"https://github.com/appsignal/statsd_parser","last_synced_at":"2025-04-11T17:25:47.101Z","repository":{"id":54836057,"uuid":"113707815","full_name":"appsignal/statsd_parser","owner":"appsignal","description":"(Dog)StatsD parser written in Rust","archived":false,"fork":false,"pushed_at":"2021-01-26T10:17:04.000Z","size":28,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T22:42:20.097Z","etag":null,"topics":["dogstatsd","parser","rust","statsd"],"latest_commit_sha":null,"homepage":null,"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/appsignal.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}},"created_at":"2017-12-09T23:10:54.000Z","updated_at":"2021-08-07T12:17:56.000Z","dependencies_parsed_at":"2022-08-14T04:20:19.111Z","dependency_job_id":null,"html_url":"https://github.com/appsignal/statsd_parser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fstatsd_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fstatsd_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fstatsd_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fstatsd_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appsignal","download_url":"https://codeload.github.com/appsignal/statsd_parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248448681,"owners_count":21105343,"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":["dogstatsd","parser","rust","statsd"],"created_at":"2024-11-14T18:19:41.115Z","updated_at":"2025-04-11T17:25:47.048Z","avatar_url":"https://github.com/appsignal.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (Dog)statsD Parser\n\n[![Build Status](https://travis-ci.org/appsignal/statsd_parser.svg?branch=main)](https://travis-ci.org/appsignal/statsd_parser)\n[![Crate](http://meritbadge.herokuapp.com/statsd_parser)](https://crates.io/crates/statsd_parser)\n\nParses (Dog)StatsD strings and returns a normalized struct.\n\nAll [standard StatsD](https://github.com/b/statsd_spec) metric types are implemented.\nFor [DogStatsD](https://docs.datadoghq.com/guides/dogstatsd/) sample rates and tags are implemented.\n\n```rust\nuse statsd_parser;\n\n#[test]\nfn test_statsd_counter_with_sample_rate_and_tags() {\n    let mut tags = BTreeMap::new();\n    tags.insert(\"foo\".to_string(), \"bar\".to_string());\n    tags.insert(\"moo\".to_string(), \"maa\".to_string());\n\n    let expected = Metric::Counter(Counter {\n        name: \"gorets\".to_string(),\n        value: 1.0,\n        sample_rate: Some(0.9),\n        tags: Some(tags)\n    });\n\n    assert_eq!(parse(\"gorets:1|c|@0.9|#foo:bar,moo:maa\"), Ok(expected));\n}\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nContributions are very welcome. Please make sure that you add a test for any use case you want to add.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsignal%2Fstatsd_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsignal%2Fstatsd_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsignal%2Fstatsd_parser/lists"}