{"id":22177597,"url":"https://github.com/ntidev/metricsbundle","last_synced_at":"2025-03-24T18:25:21.389Z","repository":{"id":57029123,"uuid":"118620896","full_name":"ntidev/MetricsBundle","owner":"ntidev","description":"StatsD Client","archived":false,"fork":false,"pushed_at":"2020-08-12T16:06:33.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-03T00:35:04.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntidev.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}},"created_at":"2018-01-23T14:24:36.000Z","updated_at":"2020-08-12T16:01:07.000Z","dependencies_parsed_at":"2022-08-23T18:50:14.649Z","dependency_job_id":null,"html_url":"https://github.com/ntidev/MetricsBundle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntidev%2FMetricsBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntidev%2FMetricsBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntidev%2FMetricsBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntidev%2FMetricsBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntidev","download_url":"https://codeload.github.com/ntidev/MetricsBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245326546,"owners_count":20597059,"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-12-02T08:29:50.090Z","updated_at":"2025-03-24T18:25:21.365Z","avatar_url":"https://github.com/ntidev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MetricsBundle\nStatsD Client\n\n### Installation\n\n1. Install the bundle using composer:\n\n    ```bash\n    $ composer require nti/metrics-bundle \"dev-master\"\n    ```\n\n2. Add the bundle configuration to the AppKernel\n\n    ```php\n    public function registerBundles()\n    {\n        $bundles = array(\n            ...\n            new NTI\\MetricsBundle\\NTIMetricsBundle(),\n            ...\n        );\n    }\n\n3. Setup the configuration in the ``config.yml``\n\n```yaml\n# NTI Metrics\nnti_metrics:\n    host: \"statsDserver\" # default: localhost\n    port: 8125           # default: 8125\n    prefix: \"greenlink.\" # default: \"\"\n```\n\n### Usage\n\n1. Get the Metrics Client service\n\n```php\n$collector = $container-\u003eget('nti.metrics');\n```\n\nThe following methods are available for send metrics:\n\n```php\n$collector-\u003eincrement('glbs.email.send');            # Same as send \"glbs.email.send:1|c\"\n$collector-\u003edecrement('glbs.email.send');            # Same as send \"glbs.email.send:-1|c\"\n```\n\nTo send the values to statsD server you have to call the following method:\n\n```php\n$collector-\u003eflush();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntidev%2Fmetricsbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntidev%2Fmetricsbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntidev%2Fmetricsbundle/lists"}