{"id":16376408,"url":"https://github.com/rochdev/datadog-tracer-js","last_synced_at":"2025-03-16T15:33:51.720Z","repository":{"id":82862990,"uuid":"87794491","full_name":"rochdev/datadog-tracer-js","owner":"rochdev","description":"[DEPRECATED] OpenTracing tracer implementation for Datadog in JavaScript.","archived":false,"fork":false,"pushed_at":"2018-06-23T07:58:15.000Z","size":380,"stargazers_count":39,"open_issues_count":20,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T12:15:28.389Z","etag":null,"topics":["datadog","opentracing"],"latest_commit_sha":null,"homepage":"","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/rochdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2017-04-10T09:44:46.000Z","updated_at":"2024-01-24T13:48:50.000Z","dependencies_parsed_at":"2023-03-02T04:45:43.067Z","dependency_job_id":null,"html_url":"https://github.com/rochdev/datadog-tracer-js","commit_stats":{"total_commits":58,"total_committers":2,"mean_commits":29.0,"dds":"0.12068965517241381","last_synced_commit":"2b166b681ef10242bdf30d9fe784b6787f56ed44"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochdev%2Fdatadog-tracer-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochdev%2Fdatadog-tracer-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochdev%2Fdatadog-tracer-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochdev%2Fdatadog-tracer-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rochdev","download_url":"https://codeload.github.com/rochdev/datadog-tracer-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221517079,"owners_count":16836277,"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":["datadog","opentracing"],"created_at":"2024-10-11T03:24:35.990Z","updated_at":"2024-10-27T10:52:35.004Z","avatar_url":"https://github.com/rochdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datadog Tracer\n\n[![npm](https://img.shields.io/npm/v/datadog-tracer.svg)](https://www.npmjs.com/package/datadog-tracer)\n[![Build Status](https://travis-ci.org/rochdev/datadog-tracer-js.svg?branch=master)](https://travis-ci.org/rochdev/datadog-tracer-js)\n[![codecov](https://codecov.io/gh/rochdev/datadog-tracer-js/branch/master/graph/badge.svg)](https://codecov.io/gh/rochdev/datadog-tracer-js)\n[![Code Climate](https://codeclimate.com/github/rochdev/datadog-tracer-js/badges/gpa.svg)](https://codeclimate.com/github/rochdev/datadog-tracer-js)\n[![Greenkeeper badge](https://badges.greenkeeper.io/rochdev/datadog-tracer-js.svg)](https://greenkeeper.io/)\n[![bitHound Dependencies](https://www.bithound.io/github/rochdev/datadog-tracer-js/badges/dependencies.svg)](https://www.bithound.io/github/rochdev/datadog-tracer-js/master/dependencies/npm)\n\n## DEPRECATED: The official library [dd-trace-js](https://github.com/DataDog/dd-trace-js) has now been released.\n\nOpenTracing tracer implementation for Datadog in JavaScript.\nIt is intended for use both on the server and in the browser.\n\n## Installation\n\n### NodeJS\n\n```sh\nnpm install --save datadog-tracer\n```\n\n*Node \u003e= 4 is required.*\n\n### Browser\n\nThe library supports CommonJS and AMD loaders and also exports globally as `DatadogTracer`.\n\n**NOTE:** If you want to use binary propagation, make sure to also include the minimal version of [protobuf.js](https://github.com/dcodeIO/protobuf.js/tree/master/dist/minimal) before this library.\n\n#### CDN\n\n```html\n\u003cscript src=\"//cdn.rawgit.com/rochdev/datadog-tracer-js/0.X.X/dist/datadog-tracer.min.js\"\u003e\u003c/script\u003e\n```\n\n**NOTE:** Remember to replace the version tag with the exact [release](https://github.com/rochdev/datadog-tracer-js/tags) your project depends upon.\n\n#### Frontend\n\n```html\n\u003cscript src=\"node_modules/datadog-tracer/dist/datadog-tracer.min.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nSee the OpenTracing JavaScript [documentation](https://github.com/opentracing/opentracing-javascript) for more information.\n\n### Custom tracer options\n\n* **service**: name of the Datadog service\n* **hostname**: hostname of the Datadog agent *(default: localhost)*\n* **port**: port of the Datadog agent *(default: 8126)*\n* **protocol**: protocol of the Datadog agent *(default: http)*\n* **endpoint**: full URL of the Datadog agent *(alternative to hostname+port+protocol)*\n\n### Example\n\n```js\nconst express = require('express')\nconst Tracer = require('datadog-tracer')\n\nconst app = express()\nconst tracer = new Tracer({ service: 'example' })\n\n// handle errors from Datadog agent. omit this if you want to ignore errors\ntracer.on('error', e =\u003e console.log(e))\n\napp.get('/hello/:name', (req, res) =\u003e {\n  const span = tracer.startSpan('say_hello')\n\n  span.addTags({\n    'resource': '/hello/:name', // required by Datadog\n    'type': 'web', // required by Datadog\n    'span.kind': 'server',\n    'http.method': 'GET',\n    'http.url': req.url,\n    'http.status_code': '200'\n  })\n\n  span.finish()\n\n  res.send(`Hello, ${req.params.name}!`)\n})\n\napp.listen(3000)\n```\n\nSee the [examples](examples) folder for more advanced examples.\n\n## API Documentation\n\nSee the OpenTracing JavaScript [API](https://doc.esdoc.org/github.com/opentracing/opentracing-javascript/)\n\n## Additional Resources\n\n* [OpenTracing Specification](https://github.com/opentracing/specification/blob/master/specification.md)\n* [OpenTracing Semantic Conventions](https://github.com/opentracing/specification/blob/master/semantic_conventions.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochdev%2Fdatadog-tracer-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frochdev%2Fdatadog-tracer-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochdev%2Fdatadog-tracer-js/lists"}