{"name":"@opentelemetry/exporter-metrics-otlp-proto","version":"0.36.1","keywords":["opentelemetry","nodejs","protobuf","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/exporter-metrics-otlp-proto@0.36.1","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":"b9594ff823fd22c21d60cb0acc6ac529b30f5a1d","tarball":"http://registry-npm.ywwl.com/@opentelemetry/exporter-metrics-otlp-proto/download/@opentelemetry/exporter-metrics-otlp-proto-0.36.1.tgz","fileCount":12,"integrity":"sha512-dKJRKvIiyupuZJOVCzW9wNfsK6RxkELnzCSJHzFoIwhGRXSYpbWyYrfHj4ZJZWYZiQSJ7+I8BFUa4aSkBgnO0w==","signatures":[{"sig":"MEYCIQDpopTAhAzsPAs2azrS8X+CUOlPuQilsrgSByhjZhZb6gIhAO/2f6M84OxbNXuKoMZ1De0YhV0AbkgMkmQKs6VsFZbN","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\nwsFzBAEBCAAGBQJkGIWAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxYhAApL6RdYegnpw/vp8Ed5Qvh3EgWYUn6FHbQSX62nZcMJVJlo05\r\nhiAjY4xGP30FSfrutYEhEaQ5nzhxbrroAT+S/x9iV+i3NI6eGlCivbDs8MKT\r\nT1jPMcDrzPs/EFdfxFjCqdHcHeJuWURufs6RLhDzLJt2loHteZgmIIYy4WhT\r\n3sTzUBQjfdIK3r3VkqyylE3C0bYYfPbl5/ypxMd36cFOryAJWbSW0BkoVTYU\r\nfshgrK6GObrLoLkhR+BcccUJ/GMwr1HWx8kVRp1H6L0+JBJoNUy/ZlAD4fv3\r\nNW+IZAM/4DCdT9tg3paLN0PA1A72R16dN70qwyY9SfBu/e+YaN9TAtrcig3s\r\n7Og+1F1fvl9QdP5ORUF66wWjOLI4B+RJgBfr5PG50y2nrsb1uvxbty03UUt5\r\nVZxHW2lQyrzjtfNgi8eddkhrIJA2GhAqCJvkxuXMMN4siqrHuKv6hASuKOHy\r\naddtaXyf8mmuzWT9Lx/dn2gcw0UQUZm8nzdh3+SJ0T9cm7cUhwxDH/lYFz36\r\nMFcqTVeufWYzJTWvmSBn9xJfnNzhB0HvfL0i6UD+oEaii8sZocqjL9Zx16R4\r\nDXPaGBdcIbkctxtEDAabuDNrWizBqdXClva6vXVvn8XtTF7OKOCDACqVfGZL\r\nDnxQwP3n+rS83VVLbbaPyh9W0IbBVHjV5Zg=\r\n=52WE\r\n-----END PGP SIGNATURE-----\r\n","size":8986,"noattachment":false,"key":"/@opentelemetry/exporter-metrics-otlp-proto/-/@opentelemetry/exporter-metrics-otlp-proto-0.36.1.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=14"},"gitHead":"486df99906958de9b8b666839785b00160a6a229","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.1","@opentelemetry/resources":"1.10.1","@opentelemetry/sdk-metrics":"1.10.1","@opentelemetry/otlp-transformer":"0.36.1","@opentelemetry/otlp-exporter-base":"0.36.1","@opentelemetry/otlp-proto-exporter-base":"0.36.1","@opentelemetry/exporter-metrics-otlp-http":"0.36.1"},"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.1_1679328640230_0.7889091076938282","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":1679328640441,"_cnpm_publish_time":1679328640441,"dist-tags":{"canary":"0.300.0-rc.0","latest":"0.301.0","next":"0.34.0"}}