{"id":18601944,"url":"https://github.com/better/datadog-stats-buildkite-plugin","last_synced_at":"2025-04-10T19:30:51.894Z","repository":{"id":56347984,"uuid":"263496426","full_name":"better/datadog-stats-buildkite-plugin","owner":"better","description":"Buildkite plugin for sending granular metrics to datadog","archived":false,"fork":false,"pushed_at":"2020-12-01T22:03:13.000Z","size":40,"stargazers_count":6,"open_issues_count":1,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-25T03:01:56.917Z","etag":null,"topics":["buildkite-plugin","datadog-metrics","stats"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/better.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-13T01:40:40.000Z","updated_at":"2024-02-05T18:00:45.000Z","dependencies_parsed_at":"2022-08-15T17:01:07.309Z","dependency_job_id":null,"html_url":"https://github.com/better/datadog-stats-buildkite-plugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/better%2Fdatadog-stats-buildkite-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/better%2Fdatadog-stats-buildkite-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/better%2Fdatadog-stats-buildkite-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/better%2Fdatadog-stats-buildkite-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/better","download_url":"https://codeload.github.com/better/datadog-stats-buildkite-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281395,"owners_count":21077423,"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":["buildkite-plugin","datadog-metrics","stats"],"created_at":"2024-11-07T02:09:47.992Z","updated_at":"2025-04-10T19:30:51.645Z","avatar_url":"https://github.com/better.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datadog Stats Buildkite Plugin\n\nCollects detailed stats about step runtimes and reports them to datadog.\nSends the following metrics for the step:\n\n* `buildkite.steps.step.duration` - Distribution metric of the duration of the entire step\n* `buildkite.steps.checkout.duration` - Distrubution metric of the duration of the checkout\n* `buildkite.steps.command.duration` - Distrubution metric of the duration of the command\n\nBy default this tags each of those metrics with the following tags:\n\n* `is_master` - Whether or not this branch is `master`\n* `pipeline_slug` - The pipeline slug for the pipeline this step is running in\n* `step_label` - The label used for this particular step\n* `retry_count` - The current retry count\n* `agent_queue` - The queue that the agent who ran this job came from\n\n## Example\n\nAdd the following to your `pipeline.yml`:\n\n```yml\nsteps:\n  - command: ls\n    plugins:\n      - better/datadog-stats#v1.0.2:\n          dogstatsd_host: 'localhost'\n```\n\n### Example of using additional tags\n\nThis example assumes you set the `PROJECT` environment variable to\nsomething useful on your agents prior to the `post-checkout` step. And\nwill add the tags `project:\u003cyour PROJECT env var\u003e` and\n`hard_coded_value:some_string` to all the metrics.\n\n```yml\nsteps:\n  - command: ls\n    plugins:\n      - better/datadog-stats#v1.0.2:\n          dogstatsd_host: 'localhost'\n          additional_tags:\n            - tag: project\n              env_var: PROJECT\n            - tag: hard_coded_value\n              value: some_string\n```\n\n## Configuration\n\n### `dogstatsd_host` (Required, string)\n\nThe host where this agent can reach a running instance of dogstatsd for\nreporting metrics to.\n\n### `dogstatsd_port` (Optional, string)\n\nThe port where this agent can reach dogstatsd on wherever is specified\nin `dogstatsd_host`. This defaults to the default port for dogstatsd\nwhich is `8125`.\n\n### `metric_prefix` (Optional, string)\n\nThe base part of the metric that the plugin will report to datadog. This\ndefaults to `buildkite.steps`.\n\n### `additional_tags` (Optional, array)\n\nThis is an array of additional tags you want to send and where to find\nthem in the environment variables. Each entry is an object with\nproperties\n\n* `tag` which is the tag name to send to datadog\n* `env_var` which is the environment variable to pull the tag's value from\n* `value` which is a static value to send for that tag\n\n## Developing\n\nTo run the tests:\n\n```shell\ndocker-compose run --rm tests\n```\n\nTo run shellcheck:\n\n```shell\ndocker run --rm -v \"$PWD:/mnt\" koalaman/shellcheck:stable hooks/** lib/**\n```\n\n## Contributing\n\n1. Fork the repo\n2. Make the changes\n3. Run the tests\n4. Commit and push your changes\n5. Send a pull request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetter%2Fdatadog-stats-buildkite-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetter%2Fdatadog-stats-buildkite-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetter%2Fdatadog-stats-buildkite-plugin/lists"}