{"id":13487635,"url":"https://github.com/eggjs/tracer","last_synced_at":"2025-10-28T15:58:19.419Z","repository":{"id":57220807,"uuid":"65787546","full_name":"eggjs/tracer","owner":"eggjs","description":"tracer plugin for egg","archived":false,"fork":false,"pushed_at":"2025-02-04T11:20:33.000Z","size":34,"stargazers_count":30,"open_issues_count":1,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-02-04T12:24:48.256Z","etag":null,"topics":["egg-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/eggjs.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-08-16T04:29:11.000Z","updated_at":"2025-02-04T11:20:36.000Z","dependencies_parsed_at":"2025-02-04T12:35:11.188Z","dependency_job_id":null,"html_url":"https://github.com/eggjs/tracer","commit_stats":{"total_commits":12,"total_committers":7,"mean_commits":"1.7142857142857142","dds":0.75,"last_synced_commit":"d0fa496cd4cff3c34eabf93dde57f752035356eb"},"previous_names":["eggjs/tracer"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Ftracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Ftracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Ftracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Ftracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eggjs","download_url":"https://codeload.github.com/eggjs/tracer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245868327,"owners_count":20685609,"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":["egg-plugin"],"created_at":"2024-07-31T18:01:01.447Z","updated_at":"2025-10-28T15:58:14.369Z","avatar_url":"https://github.com/eggjs.png","language":"TypeScript","readme":"# @eggjs/tracer\n\n[![NPM version][npm-image]][npm-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n[![Node.js Version](https://img.shields.io/node/v/@eggjs/tracer.svg?style=flat)](https://nodejs.org/en/download/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)\n![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/eggjs/security)\n\n[npm-image]: https://img.shields.io/npm/v/@eggjs/tracer.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@eggjs/tracer\n[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/tracer.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/eggjs/tracer?branch=master\n[snyk-image]: https://snyk.io/test/npm/@eggjs/tracer/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/@eggjs/tracer\n[download-image]: https://img.shields.io/npm/dm/@eggjs/tracer.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@eggjs/tracer\n\ntracer plugin for egg.\n\n## Install\n\n```bash\nnpm i @eggjs/tracer\n```\n\n## Usage\n\nEnable tracer plugin:\n\n```js\n// config/plugin.js\nexports.tracer = {\n  enable: true,\n  package: '@eggjs/tracer',\n};\n```\n\n### Build my own tracer\n\n```js\n// my_tracer.js\nconst { Tracer } = require('@eggjs/tracer');\n\nconst counter = 0;\n\nclass MyTracer extends Tracer {\n  get traceId() {\n    return `${counter++}-${Date.now()}-${process.pid}`;\n  }\n}\nmodule.exports = MyTracer;\n```\n\nChange the config to use `MyTracer`:\n\n```js\n// config/config.default.js\nexports.tracer = {\n  Class: require('path/to/my_tracer.js'),\n};\n```\n\n## Questions \u0026 Suggestions\n\nPlease open an issue [here](https://github.com/eggjs/egg/issues).\n\n## License\n\n[MIT](LICENSE)\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=eggjs/tracer)](https://github.com/eggjs/tracer/graphs/contributors)\n\nMade with [contributors-img](https://contrib.rocks).\n","funding_links":[],"categories":["仓库","Plugins"],"sub_categories":["插件"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggjs%2Ftracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feggjs%2Ftracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggjs%2Ftracer/lists"}