{"id":16426718,"url":"https://github.com/pulyaevskiy/dart-statsd","last_synced_at":"2025-07-25T21:38:36.817Z","repository":{"id":46916107,"uuid":"49239627","full_name":"pulyaevskiy/dart-statsd","owner":"pulyaevskiy","description":"StatsD client for Dart","archived":false,"fork":false,"pushed_at":"2024-01-22T18:48:15.000Z","size":15,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T03:34:37.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pulyaevskiy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-01-08T00:38:48.000Z","updated_at":"2021-12-06T18:10:00.000Z","dependencies_parsed_at":"2025-02-12T03:31:33.887Z","dependency_job_id":"a3c6c0b0-9a62-4b34-be76-4ea6f3ee77e8","html_url":"https://github.com/pulyaevskiy/dart-statsd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Fdart-statsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Fdart-statsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Fdart-statsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulyaevskiy%2Fdart-statsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulyaevskiy","download_url":"https://codeload.github.com/pulyaevskiy/dart-statsd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240122574,"owners_count":19751142,"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":[],"created_at":"2024-10-11T08:10:03.675Z","updated_at":"2025-02-22T03:44:27.255Z","avatar_url":"https://github.com/pulyaevskiy.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StatsD client for Dart\n\n[![Build Status](https://img.shields.io/travis-ci/pulyaevskiy/dart-statsd.svg?branch=master\u0026style=flat-square)](https://travis-ci.org/pulyaevskiy/dart-statsd)\n[![Pub package](https://img.shields.io/pub/v/statsd.svg?style=flat-square)](https://pub.dartlang.org/packages/statsd)\n[![License](https://img.shields.io/badge/license-BSD--2-blue.svg?style=flat-square)](https://raw.githubusercontent.com/pulyaevskiy/dart-statsd/master/LICENSE)\n\nA [StatsD](https://github.com/etsy/statsd) client library implemented in Dart.\n\n## Installation\n\nUse git dependency in your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  statsd: \"^0.2.0\"\n```\n\nAnd then import it as usual:\n\n```dart\nimport 'package:statsd/statsd.dart';\n```\n\n## Usage\n\nBasic example:\n\n```dart\nimport 'dart:io';\nimport 'dart:async';\nimport 'package:statsd/statsd.dart';\n\nFuture main() async {\n  var connection = await StatsdConnection.connect(\n    Uri.parse('udp://127.0.0.1:5678'));\n  var client = new StatsdClient(connection, prefix: 'myapp');\n  // Sending counters:\n  await client.count('metric1'); // increment `myapp.metric1` by 1\n  await client.count('metric1', -1); // decrement `myapp.metric1` by 1\n  await client.count('metric1', 5, 0.1); // increment `myapp.metric1` by 5 with 0.1 sample rate\n\n  // Sending timings:\n  var stopwatch = new Stopwatch();\n  stopwatch.start();\n  // client will use value of stopwatch.elapsedMilliseconds\n  await client.time('response-time', stopwatch);\n\n  // Sending gauges:\n  await client.gauge('metric2', 428); // sets gauge value to 428\n  await client.gaugeDelta('metric2', 3); // increments value by 3\n  await client.gaugeDelta('metric2', -10); // decrements value by 10\n\n  // Sending sets:\n  await client.set('uniques', 345);\n\n  // Sending multiple metrics at once:\n  var batch = client.batch();\n  batch\n    ..time('response-time', stopwatch)\n    ..count('total-requests', 3)\n    ..set('metric1', 56);\n  await batch.send();\n\n  // Make sure to close the connection when done:\n  connection.close();\n}\n```\n\nCurrent limitations:\n\n* Only UDP connections are supported at this moment.\n\n## License\n\nBSD-2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulyaevskiy%2Fdart-statsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulyaevskiy%2Fdart-statsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulyaevskiy%2Fdart-statsd/lists"}