{"name":"@opentelemetry/exporter-metrics-otlp-proto","version":"0.208.0","keywords":["opentelemetry","nodejs","protobuf","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/exporter-metrics-otlp-proto@0.208.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-proto","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"09e923df3c6ab0d0f32ffdc213ec90f6d06f7af8","tarball":"http://registry-npm.ywwl.com/@opentelemetry/exporter-metrics-otlp-proto/download/@opentelemetry/exporter-metrics-otlp-proto-0.208.0.tgz","fileCount":66,"integrity":"sha512-CvvVD5kRDmRB/uSMalvEF6kiamY02pB46YAqclHtfjJccNZFxbkkXkMMmcJ7NgBFa5THmQBNVQ2AHyX29nRxOw==","signatures":[{"sig":"MEYCIQCmH7SFakM2NJt4UbDl6wnAYbGaKkzcjpujPBzk3L4ZVgIhAIwLczheaRp4Q9VA20L970VCrhpVsmnj4vAXGLksrStH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fexporter-metrics-otlp-proto@0.208.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":69289,"size":10521,"noattachment":false,"key":"/@opentelemetry/exporter-metrics-otlp-proto/-/@opentelemetry/exporter-metrics-otlp-proto-0.208.0.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"5eaa869bf08e6a16eec37eac44084257e8e21209","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","test:browser":"karma start --single-run","align-api-deps":"node ../../../scripts/align-api-deps.js","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:27f6add7-0a28-40d1-a1fe-c3d691383910"}},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/9.0.0/node@v24.11.0+x64 (linux)","description":"OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector using protobuf over HTTP","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","dependencies":{"@opentelemetry/core":"2.2.0","@opentelemetry/resources":"2.2.0","@opentelemetry/sdk-metrics":"2.2.0","@opentelemetry/otlp-transformer":"0.208.0","@opentelemetry/otlp-exporter-base":"0.208.0","@opentelemetry/exporter-metrics-otlp-http":"0.208.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"17.1.0","karma":"6.4.4","mocha":"11.7.4","sinon":"18.0.1","webpack":"5.101.3","ts-loader":"9.5.4","typescript":"5.0.4","@babel/core":"7.27.1","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"6.0.1","@types/mocha":"10.0.10","@types/sinon":"17.0.4","babel-loader":"10.0.0","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@babel/preset-env":"7.27.2","@opentelemetry/api":"1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"7.0.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/exporter-metrics-otlp-proto_0.208.0_1762444682451_0.30705127975323165","host":"s3://npm-registry-packages-npm-production"},"readme":"# OpenTelemetry Collector Metrics Exporter for node with protobuf\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\n**Note: This is an experimental package under active development. New releases may include breaking changes.**\n\nThis module provides a metrics-exporter for OTLP (http/protobuf) using protocol version `v1.7.0`.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/exporter-metrics-otlp-proto\n```\n\n## Shared HTTP exporter options\n\nThis exporter uses the shared HTTP options documented in [`@opentelemetry/otlp-exporter-base`][otlp-exporter-base-config].\nThat includes `url`, `headers`, `timeoutMillis`, `concurrencyLimit`, and Node.js options such as `compression`, `keepAlive`, `httpAgentOptions`, and `userAgent`.\n\n## Service Name\n\nThe OpenTelemetry Collector Exporter does not have a service name configuration.\nIn order to set the service name, use the `service.name` resource attribute as prescribed in the [OpenTelemetry Resource Semantic Conventions][semconv-resource-service-name].\nTo see sample code and documentation for the traces exporter, visit the [Collector Trace Exporter for web and node][trace-exporter-url].\n\n## Metrics in Node - PROTO over http\n\n```js\nconst { MeterProvider, PeriodicExportingMetricReader } = require('@opentelemetry/sdk-metrics');\nconst { OTLPMetricExporter } =  require('@opentelemetry/exporter-metrics-otlp-proto');\nconst collectorOptions = {\n  url: '<opentelemetry-collector-url>', // url is optional and can be omitted - default is http://localhost:4318/v1/metrics\n};\nconst metricExporter = new OTLPMetricExporter(collectorOptions);\nconst meterProvider = new MeterProvider({\n  readers: [\n    new PeriodicExportingMetricReader({\n      exporter: metricExporter,\n      exportIntervalMillis: 1000,\n    }),\n  ],\n});\n\n// Now, start recording data\nconst meter = meterProvider.getMeter('example-meter');\nconst counter = meter.createCounter('metric_name');\ncounter.add(10, { 'key': 'value' });\n\n```\n\n## Environment Variable Configuration\n\nIn addition to settings passed to the constructor, the exporter also supports configuration via environment variables:\n\n| Environment variable                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| OTEL_EXPORTER_OTLP_ENDPOINT                       | The endpoint to send metrics to. This will also be used for the traces exporter if `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` is not configured. By default `http://localhost:4318` will be used. `/v1/metrics` will be automatically appended to configured values.                                                                                                                                                                                                                                                                                                                                                                                                   |\n| OTEL_EXPORTER_OTLP_METRICS_ENDPOINT               | The endpoint to send metrics to. By default `http://localhost:4318/v1/metrics` will be used. `v1/metrics` will not be appended automatically and has to be added explicitly.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE | The exporters aggregation temporality preference. Valid values are `cumulative`, `delta` and `lowmemory`. `cumulative` selects cumulative temporality for all instrument kinds. `delta` selects delta aggregation temporality for Counter, Asynchronous Counter and Histogram instrument kinds, and selects cumulative aggregation for UpDownCounter and Asynchronous UpDownCounter instrument kinds. `lowmemory` selects delta aggregation temporality for Counter and Histogram instrument kinds, and selects cumulative aggregation for UpDownCounter, Asynchronous Counter and Asynchronous UpDownCounter instrument kinds. By default `cumulative` is used. |\n\n> Settings configured programmatically take precedence over environment variables. Per-signal environment variables take\n> precedence over non-per-signal environment variables.\n\n## Running opentelemetry-collector locally to see the metrics\n\n1. Go to `examples/otlp-exporter-node`\n2. Follow the instructions there to observe the metrics.\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/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/exporter-metrics-otlp-proto\n[otlp-exporter-base-config]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-exporter-base#http-exporter-configuration\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fexporter-metrics-otlp-proto.svg\n[semconv-resource-service-name]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service\n[trace-exporter-url]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http\n","publish_time":1762444682625,"_cnpm_publish_time":1762444682625,"dist-tags":{"canary":"0.300.0-rc.0","latest":"0.301.0","next":"0.34.0"}}