UNPKG

@elastic/opentelemetry-instrumentation-openai

Version:

OpenTelemetry instrumentation for the `openai` OpenAI client library

94 lines (93 loc) 3.37 kB
{ "name": "@elastic/opentelemetry-instrumentation-openai", "version": "0.5.1", "description": "OpenTelemetry instrumentation for the `openai` OpenAI client library", "type": "commonjs", "publishConfig": { "access": "public", "provenance": true }, "license": "Apache-2.0", "repository": { "type": "git", "url": "git+https://github.com/elastic/elastic-otel-node.git", "directory": "packages/instrumentation-openai" }, "keywords": [ "elastic", "instrumentation", "opentelemetry", "observability", "openai", "llm", "genai" ], "author": "Elastic Observability <https://www.elastic.co/observability>", "engines": { "node": "^18.19.0 || >=20.6.0" }, "scripts": { "clean": "rm -rf node_modules build", "precompile": "./scripts/gen-version-ts.js", "compile": "tsc -p .", "prewatch": "npm run precompile", "watch": "tsc -w", "prepublishedOnly": "npm run compile", "example": "node --env-file ./openai.env -r ./test/fixtures/telemetry.js examples/use-chat.js", "lint": "npm run lint:eslint", "lint:eslint": "eslint --ext=js,mjs,cjs,ts .", "lint:fix": "eslint --ext=js,mjs,cjs,ts --fix .", "lint:eslint-nostyle": "eslint --ext=js,mjs,cjs,ts --rule 'prettier/prettier: off' . # lint without checking style, not normally used", "test": "npm run test:unit", "test:unit": "tape test/**/*.test.js", "test:regenerate-recordings": "TEST_FIXTURES_MODE=regenerate-recordings node test/fixtures.test.js", "test-all-versions": "tav", "test:integration": "TEST_FIXTURES_MODE=integration node test/fixtures.test.js", "test:integration-ollama": "TEST_FIXTURES_ENV_FILE=./ollama.env npm run test:integration", "test:integration-openai": "TEST_FIXTURES_ENV_FILE=./openai.env npm run test:integration", "test:integration-azure": "TEST_FIXTURES_ENV_FILE=./azure.env npm run test:integration", "test:all-integration-tests": "npm run test:integration-openai && npm run test:integration-azure && npm run test:integration-ollama" }, "files": [ "CHANGELOG.md", "LICENSE", "NOTICE.md", "README.md", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts" ], "main": "build/src/index.js", "types": "build/src/index.d.ts", "peerDependencies": { "@opentelemetry/api": "^1.3.0" }, "dependencies": { "@opentelemetry/api-logs": "^0.203.0", "@opentelemetry/instrumentation": "^0.203.0", "debug": "^4.3.6" }, "devDependencies": { "@elastic/mockotlpserver": "^0.8.0", "@opentelemetry/api": "^1.9.0", "@opentelemetry/exporter-logs-otlp-proto": "^0.203.0", "@opentelemetry/exporter-metrics-otlp-proto": "^0.203.0", "@opentelemetry/exporter-trace-otlp-proto": "^0.203.0", "@opentelemetry/instrumentation-http": "^0.203.0", "@opentelemetry/sdk-logs": "^0.203.0", "@opentelemetry/sdk-metrics": "^2.0.0", "@opentelemetry/sdk-node": "^0.203.0", "@opentelemetry/semantic-conventions": "^1.28.0", "@types/debug": "^4.1.12", "@types/glob": "^8.1.0", "@types/node": "18.18.14", "@typescript-eslint/eslint-plugin": "5.8.1", "@typescript-eslint/parser": "5.8.1", "dotenv": "^17.2.0", "nock": "^14.0.0", "openai": "^4.104.0", "tape": "^5.8.1", "test-all-versions": "^6.1.0", "typescript": "4.4.4" } }