{"name":"@opentelemetry/instrumentation-tedious","version":"0.22.0","keywords":["instrumentation","microsoft","mssql","nodejs","opentelemetry","profiling","sql server","tds","tedious","tracing"],"author":"OpenTelemetry Authors","license":"Apache-2.0","_id":"@opentelemetry/instrumentation-tedious@0.22.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-tedious#readme","dist":{"shasum":"f71374c52cb9c57a6b879bea3256a1465c02efbb","tarball":"http://registry-npm.ywwl.com/@opentelemetry/instrumentation-tedious/download/@opentelemetry/instrumentation-tedious-0.22.0.tgz","fileCount":18,"integrity":"sha512-XrrNSUCyEjH1ax9t+Uo6lv0S2FCCykcF7hSxBMxKf7Xn0bPRxD3KyFUZy25aQXzbbbUHhtdxj3r2h88SfEM3aA==","signatures":[{"sig":"MEUCIHoANKEbTxMPKVWp7ZUYHgm/yT3/cNDKGe3kYEWoAPzIAiEA6a+RNm+GNqIs7T0RKo4ReVkJanrqTiuB3IO04+YApk4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-tedious@0.22.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49770,"size":12436,"noattachment":false,"key":"/@opentelemetry/instrumentation-tedious/-/@opentelemetry/instrumentation-tedious-0.22.0.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"e7960a2061c0a039ffa57ed8dbb73d605d65f4f6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts'","clean":"rimraf build/*","compile":"tsc -p .","lint:fix":"eslint . --ext .ts --fix","setup:dev":"nx run-many -t compile -p @opentelemetry/instrumentation-tedious","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","test-all-versions":"tav"},"_npmUser":{"name":"dyladan","actor":{"name":"dyladan","type":"user","email":"dyladan@gmail.com"},"email":"dyladan@gmail.com"},"repository":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-tedious"},"_npmVersion":"lerna/8.2.3/node@v18.20.8+x64 (linux)","description":"OpenTelemetry instrumentation for `tedious` database client for Microsoft SQL Server","directories":{},"_nodeVersion":"18.20.8","dependencies":{"@types/tedious":"^4.0.14","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/semantic-conventions":"^1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"17.1.0","rimraf":"5.0.10","semver":"7.7.2","tedious":"17.0.0","typescript":"5.0.4","@types/node":"18.18.14","@types/mocha":"10.0.10","test-all-versions":"6.1.0","@opentelemetry/api":"^1.3.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.49.0","@opentelemetry/context-async-hooks":"^2.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-tedious_0.22.0_1752077471342_0.19049789938701567","host":"s3://npm-registry-packages-npm-production"},"readme":"# OpenTelemetry Tedious Instrumentation for Node.js\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis module provides automatic instrumentation for the [`tedious`](https://github.com/tediousjs/tedious) module.\n\nIf total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](https://www.npmjs.com/package/@opentelemetry/sdk-node) for the most seamless instrumentation experience.\n\nCompatible with OpenTelemetry JS API and SDK `1.0+`.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/instrumentation-tedious\n```\n\n## Supported Versions\n\n- [tedious](https://www.npmjs.com/package/tedious) `>=1.11.0 <21`\n\n## Usage\n\nOpenTelemetry Tedious Instrumentation allows the user to automatically collect trace data and export them to the backend of choice, to give observability to distributed systems when working with [`tedious`](https://github.com/tediousjs/tedious).\n\nTo enable a specific instrumentation, pass it to `registerInstrumentations()`.\nThis is commonly done via `NodeSDK` for fully setting up all OpenTelemetry SDK components:\n\n```js\nconst { NodeSDK } = require('@opentelemetry/sdk-node');\nconst { TediousInstrumentation } = require('@opentelemetry/instrumentation-tedious');\n\nconst sdk = new NodeSDK({\n  instrumentations: [\n    new TediousInstrumentation(),\n  ],\n});\nsdk.start();\nprocess.once('beforeExit', async () => { await sdk.shutdown(); });\n```\n\n## Semantic Conventions\n\nThis instrumentation creates spans with attributes from the stable database and networking semantic conventions.\n\nThe `instrumentation-tedious` versions 0.39.0 and later emit the stable v1.33.0+ semantic conventions.\n\n| Attribute                  | Description                                                                                   |\n| -------------------------- | --------------------------------------------------------------------------------------------- |\n| `db.system.name`           | Database system identifier: `'microsoft.sql_server'`                                          |\n| `db.query.text`            | The database query being executed.                                                            |\n| `db.namespace`             | The database associated with the connection.                                                  |\n| `db.collection.name`       | The name of a collection (table, container) within the database.                              |\n| `db.operation.name`        | The name of the operation or command being executed.                                          |\n| `db.stored_procedure.name` | The stored procedure name.                                                                    |\n| `db.response.status_code`  | The SQL Server error number as a string, set on error (e.g. `\"208\"` for invalid object name). |\n| `error.type`               | Describes a class of error the operation ended with.                                          |\n| `server.address`           | Remote hostname or similar.                                                                   |\n| `server.port`              | Remote port number.                                                                           |\n\n### Trace Context Propagation\n\nDatabase trace context propagation can be enabled by setting `enableTraceContextPropagation` to `true`.\nThis uses the [SET CONTEXT_INFO](https://learn.microsoft.com/en-us/sql/t-sql/statements/set-context-info-transact-sql?view=sql-server-ver16)\ncommand to set [traceparent](https://www.w3.org/TR/trace-context/#traceparent-header) information\nfor the current connection, which results in **an additional round-trip to the database**.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-tedious\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-tedious.svg\n","publish_time":1752077471508,"_cnpm_publish_time":1752077471508,"dist-tags":{"latest":"0.44.0"}}