{"name":"@opentelemetry/exporter-metrics-otlp-proto","version":"0.36.0","keywords":["opentelemetry","nodejs","protobuf","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/exporter-metrics-otlp-proto@0.36.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.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":"eb793005d38e2448e7f8737cba14b6a47eb4e250","tarball":"http://registry-npm.ywwl.com/@opentelemetry/exporter-metrics-otlp-proto/download/@opentelemetry/exporter-metrics-otlp-proto-0.36.0.tgz","fileCount":12,"integrity":"sha512-/r/oplcdh2Wkek0XvLjN1eS50ZRPOp7Ys/iFjzxxF59DNJdWGH6/02xd6RA52XaE+J9rBc1+3iiSGUsgAfmKHQ==","signatures":[{"sig":"MEQCIFAoXG83y0iqPtm9dU8XbKuF3hd9PgZ2i9i48a5CsXMVAiA6L/N5JIzAQ84RPb6bME+nPv50iECCo3b3BEpQjNuoNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD0cfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrdag//T3s0A5fAQ6onT2O5qJCYaYJOwVvqdABN93EkU4vBDBFqbqiv\r\nMtTKNuR3BujK2Lf0mk2DslanUj/DzXWuZ8BxyGRGYfzXlyJkWhKCkm8k3Aqy\r\n3rsUIAZGjlOJZMUCxXPpvB0A2p+e9U7W6evFsabFtawzhUrTJSGsjJSIxki/\r\nULJmz8PhJV1iFXnO/Q7aqc0KEL74wPb6bKLqrttwIiPCDAWFILpvRTnKC2IL\r\nl2K8WwyeK6GdFu8/x9BPNxGkpMtHwHzeJ/Sj65+IBKrOLzM79Llv9ThpFgQD\r\n2eVdnGz2aqlClxQtALPGqvP1etqrQhSXvhSoVSGTZeWE74X7uEJjf/prAzfa\r\nayr/2oUo+wcncHSJFv3108riUrbeNJ5d+PD6gyTIxHQY+yPoAIVOChDDd7dN\r\niWoNOYCL2StCrI0FWnpozlNFgC5s8yPoPN4wbDbdLUI6/6xCRBpZtHQOxkFh\r\nu4QDGdZj5ji7F8lpHkn3wL66AsH7dbfwq/kjSgCgW8lc+nU4Xvs8vE3EV+s9\r\npvbPT3E5pVWzk5JqtrVdPX0ekE5ER3EdCP0rRO36S+YMHwk9qRVgmU6lcjzx\r\nDc0twFxrB/9X3KNcMK5UUf+W+ZcDNPZKJiZVYkGdJ7VGnWrJ5eJAdqQScFC2\r\n4ekx3PAvzYfidU4hEaLcwO7djd1bYNuv2Lc=\r\n=KM3e\r\n-----END PGP SIGNATURE-----\r\n","size":8980,"noattachment":false,"key":"/@opentelemetry/exporter-metrics-otlp-proto/-/@opentelemetry/exporter-metrics-otlp-proto-0.36.0.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=14"},"gitHead":"56e6b1bb890f844b8963a146780d0b9cfa8abd0d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector using protobuf over HTTP","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.10.0","@opentelemetry/resources":"1.10.0","@opentelemetry/sdk-metrics":"1.10.0","@opentelemetry/otlp-transformer":"0.36.0","@opentelemetry/otlp-exporter-base":"0.36.0","@opentelemetry/otlp-proto-exporter-base":"0.36.0","@opentelemetry/exporter-metrics-otlp-http":"0.36.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"cpx":"1.5.0","nyc":"15.1.0","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.16.0","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13","@opentelemetry/api":"1.4.1"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/exporter-metrics-otlp-proto_0.36.0_1678722847489_0.6748351278222797","host":"s3://npm-registry-packages"},"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":1678722847673,"_cnpm_publish_time":1678722847673,"dist-tags":{"canary":"0.300.0-rc.0","latest":"0.301.0","next":"0.34.0"}}