{"id":19094455,"url":"https://github.com/risto-stevcev/statsd-mongoose","last_synced_at":"2026-04-30T12:32:57.036Z","repository":{"id":66362030,"uuid":"54302069","full_name":"Risto-Stevcev/statsd-mongoose","owner":"Risto-Stevcev","description":":chart_with_upwards_trend: A statsd client for mongoose","archived":false,"fork":false,"pushed_at":"2016-03-20T06:14:18.000Z","size":267,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T08:44:12.998Z","etag":null,"topics":["client","mongo","mongodb","mongoose","statsd"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/statsd-mongoose","language":"JavaScript","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/Risto-Stevcev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-20T05:23:45.000Z","updated_at":"2017-08-07T09:52:28.000Z","dependencies_parsed_at":"2023-05-03T14:27:49.515Z","dependency_job_id":null,"html_url":"https://github.com/Risto-Stevcev/statsd-mongoose","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/Risto-Stevcev%2Fstatsd-mongoose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Risto-Stevcev%2Fstatsd-mongoose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Risto-Stevcev%2Fstatsd-mongoose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Risto-Stevcev%2Fstatsd-mongoose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Risto-Stevcev","download_url":"https://codeload.github.com/Risto-Stevcev/statsd-mongoose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240144117,"owners_count":19754853,"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":["client","mongo","mongodb","mongoose","statsd"],"created_at":"2024-11-09T03:29:17.308Z","updated_at":"2026-04-30T12:32:57.000Z","avatar_url":"https://github.com/Risto-Stevcev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# statsd-mongoose\n\n[![Build Status](https://travis-ci.org/Risto-Stevcev/statsd-mongoose.svg)](https://travis-ci.org/Risto-Stevcev/statsd-mongoose)\n[![Coverage Status](https://coveralls.io/repos/github/Risto-Stevcev/statsd-mongoose/badge.svg?branch=master)](https://coveralls.io/github/Risto-Stevcev/statsd-mongoose?branch=master)\n\n:chart_with_upwards_trend: A statsd client for mongoose\n\n\n## Usage\n\n```js\nconst mongoose       = require('mongoose')\n    , statsdMongoose = require('statsd-mongoose')\n\nmongoose.connect('mongodb://some.mongo.uri:1234/db-name')\nmongoose.plugin(statsdMongoose)\n```\n\n## Options\n\n`host` - The statsd hostname (default: `'localhost'`)  \n`post` - The statsd port (default: `8125`)  \n`ns` - The function that gets called to generate the namespace. It binds `this` from the mongoose `pre` and `post` middleware, and passes in the `model` and `method` names as parameters. (default: ``(model, method) =\u003e `db.${model.toLowerCase()}.${method}` ``)\n\n## How It Works\n\nThe plugin uses the statsd [lynx](https://www.npmjs.com/package/lynx) client to create `timer` metrics with mongoose `pre` and `post` middleware to record start/finish times.\nMetrics are namespaced as `db.[collection-name].[method-name]`. See the [docs](http://risto-stevcev.github.io/statsd-mongoose/docs/statsd-mongoose.html) for more info.\n\n\n## License\n\nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fristo-stevcev%2Fstatsd-mongoose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fristo-stevcev%2Fstatsd-mongoose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fristo-stevcev%2Fstatsd-mongoose/lists"}