UNPKG

dd-trace

Version:

Datadog APM tracing client for JavaScript

249 lines (248 loc) 15.1 kB
{ "name": "dd-trace", "version": "6.6.0", "description": "Datadog APM tracing client for JavaScript", "main": "index.js", "typings": "index.d.ts", "scripts": { "env": "bash ./plugin-env", "prepare": "node scripts/patch-istanbul-lib-coverage.js && node scripts/patch-v8-to-istanbul.js && cd vendor && npm ci --include=dev", "prepack": "node scripts/release/swap-v5-types.js", "bench": "node benchmark/index.js", "bench:e2e:test-optimization": "node benchmark/e2e-test-optimization/benchmark-run.js", "dependencies:dedupe": "yarn-deduplicate yarn.lock", "generate:config:types": "node scripts/generate-config-types.js", "generate:electron-package": "node scripts/generate-electron-package.js", "verify:config:types": "node scripts/generate-config-types.js --check", "verify:electron-package": "node scripts/generate-electron-package.js --check", "generate:supported-integrations": "node scripts/generate-supported-integrations.js", "verify:supported-integrations": "node scripts/generate-supported-integrations.js --check", "type:check": "tsc --noEmit -p tsconfig.dev.json", "type:doc:build": "cd docs && yarn && yarn build", "type:doc:test": "cd docs && yarn && yarn test", "lint": "node scripts/check_licenses.js && node scripts/check-no-coverage-artifacts.js && node scripts/check-no-mcr-images.js && node scripts/check-docker-image-shas.js && eslint . --concurrency=auto --max-warnings 0 && npm run lint:codeowners:ci && npm run verify-exercised-tests", "lint:fix": "node scripts/check_licenses.js && node scripts/check-no-coverage-artifacts.js && node scripts/check-no-mcr-images.js && node scripts/check-docker-image-shas.js && eslint . --concurrency=auto --max-warnings 0 --fix", "lint:inspect": "npx @eslint/config-inspector@latest", "lint:codeowners": "codeowners-audit", "lint:codeowners:ci": "codeowners-audit --glob='**/*.spec.js' --glob='benchmark/sirun/**' --glob='.agents/**' --glob='.claude/**' --glob='integration-tests/**'", "lint:editorconfig": "docker build -q -t ec .github/editorconfig-checker && docker run --rm --volume=$PWD:/check ec", "release:proposal": "node scripts/release/proposal", "services": "node ./scripts/install_plugin_modules && node packages/dd-trace/test/setup/services", "test": "echo '\nError: The root \"npm test\" command is intentionally disabled.\n\nInstead, run specific test suites:\n - npm run test:trace:core\n - npm run test:appsec\n - etc.\n\nOr run individual test files:\n npx mocha path/to/test.spec.js\n\nSee CONTRIBUTING.md (Testing section) for more details.\n' && exit 1", "test:aiguard": "mocha \"packages/dd-trace/test/aiguard/**/*.spec.js\"", "test:aiguard:ci": "node scripts/c8-ci.js test:aiguard", "test:appsec": "mocha --exclude \"packages/dd-trace/test/appsec/**/*.plugin.spec.js\" \"packages/dd-trace/test/appsec/**/*.spec.js\"", "test:appsec:ci": "node scripts/c8-ci.js test:appsec", "test:appsec:plugins": "mocha \"packages/dd-trace/test/appsec/**/*.@(${PLUGINS}).plugin.spec.js\"", "test:appsec:plugins:ci": "yarn services && node scripts/c8-ci.js test:appsec:plugins", "test:debugger": "mocha \"packages/dd-trace/test/debugger/**/*.spec.js\"", "test:debugger:ci": "node scripts/c8-ci.js test:debugger", "test:eslint-rules": "node eslint-rules/*.test.mjs", "test:trace:core": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 -- \"packages/dd-trace/test/*.spec.js\" \"packages/dd-trace/test/{agent,ci-visibility,config,crashtracking,datastreams,encode,exporters,msgpack,opentelemetry,opentracing,payload-tagging,plugins,remote_config,service-naming,standalone,telemetry,external-logger}/**/*.spec.js\"", "test:trace:core:ci": "node scripts/c8-ci.js test:trace:core", "test:trace:guardrails": "mocha \"packages/dd-trace/test/guardrails/**/*.spec.js\"", "test:trace:guardrails:ci": "node scripts/c8-ci.js test:trace:guardrails", "test:esbuild": "mocha \"packages/datadog-esbuild/test/**/*.spec.js\"", "test:esbuild:ci": "node scripts/c8-ci.js test:esbuild", "test:webpack": "mocha \"packages/datadog-webpack/test/**/*.spec.js\"", "test:webpack:ci": "node scripts/c8-ci.js test:webpack", "test:instrumentations": "mocha \"packages/datadog-instrumentations/test/@(${PLUGINS}).spec.js\"", "test:instrumentations:ci": "yarn services && node scripts/c8-ci.js test:instrumentations", "test:instrumentations:misc": "mocha \"packages/datadog-instrumentations/test/*/**/*.spec.{js,mjs}\"", "test:instrumentations:misc:ci": "node scripts/c8-ci.js test:instrumentations:misc", "test:core": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 -- \"packages/datadog-core/test/**/*.spec.js\"", "test:core:ci": "node scripts/c8-ci.js test:core", "test:code-origin": "mocha \"packages/datadog-code-origin/test/**/*.spec.js\"", "test:code-origin:ci": "node scripts/c8-ci.js test:code-origin", "test:lambda": "mocha \"packages/dd-trace/test/lambda/**/*.spec.js\"", "test:lambda:ci": "node scripts/c8-ci.js test:lambda", "test:llmobs:sdk": "mocha --exclude \"packages/dd-trace/test/llmobs/plugins/**/*.spec.js\" \"packages/dd-trace/test/llmobs/**/*.spec.js\"", "test:llmobs:sdk:ci": "node scripts/c8-ci.js test:llmobs:sdk", "test:llmobs:plugins": "mocha \"packages/dd-trace/test/llmobs/plugins/@(${PLUGINS})/*.spec.js\"", "test:llmobs:plugins:ci": "yarn services && node scripts/c8-ci.js test:llmobs:plugins", "test:openfeature": "mocha \"packages/dd-trace/test/openfeature/**/*.spec.js\"", "test:openfeature:ci": "node scripts/c8-ci.js test:openfeature", "test:plugins": "node --expose-gc ./node_modules/mocha/bin/mocha.js \"packages/datadog-plugin-@(${PLUGINS})/test/**/${SPEC:-*}*.spec.js\"", "test:plugins:ci": "yarn services && node scripts/c8-ci.js test:plugins", "test:plugins:ci:flaky": "yarn services && node scripts/c8-ci.js test:plugins --bail --retries 2", "test:plugins:upstream": "node ./packages/dd-trace/test/plugins/suite.js", "test:profiler": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 -- \"packages/dd-trace/test/profiling/**/*.spec.js\"", "test:profiler:ci": "node scripts/c8-ci.js test:profiler", "test:integration": "mocha --timeout 60000 \"integration-tests/*.spec.js\"", "test:integration:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/*.spec.js\"", "test:integration:aiguard": "mocha --timeout 60000 \"integration-tests/aiguard/*.spec.js\"", "test:integration:aiguard:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/aiguard/*.spec.js\"", "test:integration:appsec": "mocha --timeout 60000 \"integration-tests/appsec/*.spec.js\"", "test:integration:appsec:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/appsec/*.spec.js\"", "test:integration:crashtracking": "mocha --timeout 60000 \"integration-tests/crashtracking/*.spec.js\"", "test:integration:bun": "mocha --timeout 60000 \"integration-tests/bun/*.spec.js\"", "test:integration:cucumber": "mocha --timeout 60000 \"integration-tests/cucumber/*.spec.js\"", "test:integration:cucumber:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/cucumber/*.spec.js\"", "test:integration:cypress": "mocha --timeout 60000 \"integration-tests/cypress/${SPEC:-cypress-*}.spec.js\"", "test:integration:cypress:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/cypress/${SPEC:-cypress-*}.spec.js\"", "test:integration:debugger": "mocha --timeout 60000 \"integration-tests/debugger/*.spec.js\"", "test:integration:debugger:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/debugger/*.spec.js\"", "test:integration:electron": "mocha \"integration-tests/electron/*.spec.js\"", "test:integration:esbuild": "mocha --timeout 60000 \"integration-tests/esbuild/*.spec.js\"", "test:integration:esbuild:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/esbuild/*.spec.js\"", "test:integration:webpack": "mocha --timeout 60000 \"integration-tests/webpack/*.spec.js\"", "test:integration:openfeature": "mocha --timeout 60000 \"integration-tests/openfeature/*.spec.js\"", "test:integration:openfeature:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/openfeature/*.spec.js\"", "test:integration:jest": "mocha --timeout 60000 \"integration-tests/jest/${SPEC:-jest*}.spec.js\"", "test:integration:jest:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/jest/${SPEC:-jest*}.spec.js\"", "test:integration:mocha": "mocha --timeout 60000 \"integration-tests/mocha/*.spec.js\"", "test:integration:mocha:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/mocha/*.spec.js\"", "test:integration:playwright": "mocha --timeout 60000 \"integration-tests/playwright/${SPEC:-playwright-*}.spec.js\"", "test:integration:playwright:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/playwright/${SPEC:-playwright-*}.spec.js\"", "test:integration:selenium": "mocha --timeout 60000 \"integration-tests/selenium/*.spec.js\"", "test:integration:selenium:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/selenium/*.spec.js\"", "test:integration:vitest": "mocha --timeout 60000 \"integration-tests/vitest/${SPEC:-vitest*}.spec.js\"", "test:integration:vitest:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/vitest/${SPEC:-vitest*}.spec.js\"", "test:integration:testopt": "mocha --timeout 120000 \"integration-tests/ci-visibility/*.spec.js\"", "test:integration:testopt:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 120000 \"integration-tests/ci-visibility/*.spec.js\"", "test:integration:profiler": "mocha --timeout 180000 \"integration-tests/profiler/*.spec.js\"", "test:integration:profiler:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 180000 \"integration-tests/profiler/*.spec.js\"", "test:integration:plugins": "yarn services && mocha \"packages/datadog-plugin-@(${PLUGINS})/test/integration-test/**/${SPEC:-*}*.spec.js\"", "test:integration:plugins:coverage": "yarn services && node ./integration-tests/coverage/run-suite.js \"packages/datadog-plugin-@(${PLUGINS})/test/integration-test/**/${SPEC:-*}*.spec.js\"", "test:unit:plugins": "mocha \"packages/datadog-instrumentations/test/@(${PLUGINS}).spec.js\" \"packages/datadog-plugin-@(${PLUGINS})/test/**/*.spec.js\" --exclude \"packages/datadog-plugin-@(${PLUGINS})/test/integration-test/**/*.spec.js\"", "test:release": "mocha \"scripts/release/**/*.spec.js\"", "test:scripts": "mocha \"scripts/helpers/**/*.spec.js\" \"scripts/*.spec.mjs\"", "test:shimmer": "mocha \"packages/datadog-shimmer/test/**/*.spec.js\"", "test:shimmer:ci": "node scripts/c8-ci.js test:shimmer", "verify:workflow-job-names": "node scripts/verify-workflow-job-names.js", "verify-exercised-tests": "node scripts/verify-exercised-tests.js" }, "repository": { "type": "git", "url": "git+https://github.com/DataDog/dd-trace-js.git" }, "keywords": [ "datadog", "trace", "tracing", "profile", "profiler", "profiling", "opentracing", "apm" ], "author": "Datadog Inc. <info@datadoghq.com>", "license": "(Apache-2.0 OR BSD-3-Clause)", "bugs": { "url": "https://github.com/DataDog/dd-trace-js/issues" }, "homepage": "https://github.com/DataDog/dd-trace-js#readme", "engines": { "node": ">=22" }, "nodeMaxMajor": 27, "files": [ "/package.json", "ci/**/*", "cypress/**/*", "esbuild.js", "webpack.js", "ext/**/*", "index.d.ts", "index.electron.js", "index.js", "init.js", "initialize.mjs", "LICENSE-3rdparty.csv", "LICENSE", "LICENSE.Apache", "LICENSE.BSD3", "loader-hook.mjs", "openfeature.d.ts", "openfeature.js", "packages/*/index.js", "packages/*/index.electron.js", "packages/*/lib/**/*", "packages/*/src/**/*", "packages/datadog-instrumentations/orchestrion.yml", "README.md", "register.js", "vendor/dist/**/*.d.ts", "vendor/dist/**/*.js", "vendor/dist/**/*.wasm", "vendor/dist/**/LICENSE", "version.js" ], "dependencies": { "dc-polyfill": "^0.1.11", "import-in-the-middle": "^3.3.2", "opentracing": ">=0.14.7" }, "optionalDependencies": { "@datadog/libdatadog": "0.9.4", "@datadog/native-appsec": "11.0.1", "@datadog/native-iast-taint-tracking": "4.2.0", "@datadog/native-metrics": "3.1.2", "@datadog/openfeature-node-server": "2.0.0", "@datadog/pprof": "5.17.0", "@datadog/wasm-js-rewriter": "5.0.1", "@opentelemetry/api": ">=1.0.0 <1.10.0", "@opentelemetry/api-logs": "<1.0.0", "oxc-parser": "^0.132.0" }, "devDependencies": { "@actions/core": "^3.0.1", "@actions/github": "^9.1.1", "@babel/helpers": "^8.0.0", "@eslint/eslintrc": "^3.3.5", "@eslint/js": "^10.0.1", "@msgpack/msgpack": "^3.1.3", "@openfeature/core": "^1.11.0", "@openfeature/server-sdk": "~1.22.0", "@stylistic/eslint-plugin": "^5.10.0", "@types/mocha": "^10.0.10", "@types/node": "^18.19.106", "@types/sinon": "^22.0.0", "@vercel/nft": "^0.29.4", "axios": "^1.18.1", "benchmark": "^2.1.4", "body-parser": "^2.3.0", "bun": "1.3.14", "c8": "^12.0.0", "codeowners-audit": "^2.9.0", "eslint": "^10.5.0", "eslint-plugin-cypress": "^6.4.2", "eslint-plugin-import-x": "^4.16.2", "eslint-plugin-jsdoc": "^63.0.12", "eslint-plugin-mocha": "^11.3.0", "eslint-plugin-n": "^18.2.1", "eslint-plugin-promise": "^7.3.0", "eslint-plugin-sonarjs": "^4.2.0", "eslint-plugin-unicorn": "^68.0.0", "express": "^5.1.0", "glob": "^10.4.5", "globals": "^17.7.0", "graphql": "*", "husky": "^9.1.7", "istanbul-lib-report": "^3.0.0", "istanbul-reports": "^3.0.2", "jszip": "^3.10.1", "mocha": "^11.7.6", "mocha-junit-reporter": "^2.2.1", "mocha-multi-reporters": "^1.5.1", "multer": "^2.2.0", "nock": "^14.0.16", "node-preload": "^0.2.1", "nyc": "^18.0.0", "octokit": "^5.0.3", "p-limit": "^7.2.0", "proxyquire": "^2.1.3", "retry": "^0.13.1", "semifies": "^1.0.0", "semver": "^7.8.5", "sinon": "^22.0.0", "source-map-support": "^0.5.21", "test-exclude": "^8.0.0", "tiktoken": "^1.0.21", "typescript": "^6.0.3", "v8-to-istanbul": "^9.0.0", "workerpool": "^10.0.3", "yaml": "^2.9.0", "yarn-deduplicate": "^6.0.2" } }