|
| 1 | +# OpenTelemetry Qdrant instrumentation for Node.js |
| 2 | + |
| 3 | +[![NPM Published Version][npm-img]][npm-url] |
| 4 | +[![Apache License][license-image]][license-image] |
| 5 | + |
| 6 | +This module provides automatic instrumentation for [`@qdrant/js-client-rest`](https://www.npmjs.com/package/@qdrant/js-client-rest) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@traceloop/node-server-sdk`](https://www.npmjs.com/package/@traceloop/node-server-sdk) bundle. |
| 7 | + |
| 8 | +If total installation size is not constrained, it is recommended to use the [`@traceloop/node-server-sdk`](https://www.npmjs.com/package/@traceloop/node-server-sdk) bundle for the most seamless instrumentation experience. |
| 9 | + |
| 10 | +Compatible with OpenTelemetry JS API and SDK `1.0+`. |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +```bash |
| 15 | +npm install --save @traceloop/instrumentation-qdrant |
| 16 | +``` |
| 17 | + |
| 18 | +## Supported Versions |
| 19 | + |
| 20 | +- `>=1.9.0` |
| 21 | + |
| 22 | +## Usage |
| 23 | + |
| 24 | +To load a specific plugin, specify it in the registerInstrumentations's configuration: |
| 25 | + |
| 26 | +```js |
| 27 | +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); |
| 28 | +const { QdrantInstrumentation } = require("@traceloop/instrumentation-qdrant"); |
| 29 | +const { registerInstrumentations } = require("@opentelemetry/instrumentation"); |
| 30 | + |
| 31 | +const provider = new NodeTracerProvider(); |
| 32 | +provider.register(); |
| 33 | + |
| 34 | +registerInstrumentations({ |
| 35 | + instrumentations: [new QdrantInstrumentation()], |
| 36 | +}); |
| 37 | +``` |
| 38 | + |
| 39 | +## Useful links |
| 40 | + |
| 41 | +- For more information on OpenTelemetry, visit: <https://opentelemetry.io/> |
| 42 | +- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js> |
| 43 | +- For help or feedback on this project, join us on [Slack][slack-url] |
| 44 | + |
| 45 | +## License |
| 46 | + |
| 47 | +Apache 2.0 - See [LICENSE][license-url] for more information. |
| 48 | + |
| 49 | +[slack-url]: https://traceloop.com/slack |
| 50 | +[license-url]: https://github.com/traceloop/openllmetry-js/blob/main/LICENSE |
| 51 | +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat |
| 52 | +[npm-url]: https://www.npmjs.com/package/@traceloop/instrumentation-qdrant |
| 53 | +[npm-img]: https://badge.fury.io/js/%40traceloop%2Finstrumentation-qdrant.svg |
0 commit comments