{"name":"@opentelemetry/exporter-metrics-otlp-proto","version":"0.29.1","keywords":["opentelemetry","nodejs","protobuf","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/exporter-metrics-otlp-proto@0.29.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"313fa1af9473121a069c583b212c76bdb9fdd551","tarball":"http://registry-npm.ywwl.com/@opentelemetry/exporter-metrics-otlp-proto/download/@opentelemetry/exporter-metrics-otlp-proto-0.29.1.tgz","fileCount":12,"integrity":"sha512-lqpmgmvzTy6L/9KtO7GEPlIosQYlMjwI78gzyj4veFnXqFj7VRIDiA3Ugbnt7bSB5+UvI/2j3pKRWuKGsNyYjw==","signatures":[{"sig":"MEUCIDfHVnPI8e/Q0d7Yc7l9nSVzfDsV+OvPTZBWr9z394L+AiEAt/zEg/yIHtaI9Mnc4QQCOozJhRbfXhW9GFJ2s+qI4AU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil6wzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6wg/8DC3f5F+iiqve/tN/261Ktj6mxaWEvMbwcBbsJ8MPkNLwj6p/\r\n2WckdKO2Opk0FW2ht5pFCat2/BWXlCoH0ReOJ9kCJt9uohmA85AqfYwUt92V\r\nZWXXzV0SoRF+UEgUkOJUk29Gr5CsI2+egR0tD1gvRyuL0Fu+umQK5ox1cvN1\r\nnoQbbsoKpw85H9JKqdXumwpiAoaKemQkrD9LCYcC/kZzYQWsvkePLsFbAjAF\r\ns88vw/7w9jd5VWBQStPemtLxcmP4kMUH6yGzIdZxp5xYETWbzyDkekG/XRn5\r\nYoNSPno3v6rCABe6fmXpER/AtpXTsCTlFbReK0gMRSgov57qBS+x3kfKQv9I\r\n+2k7UIigG/Y9xjLADfa7zeRbSQm5xQ8qq/PeTVYnE3yTt9X9Q60pQi3qMrmu\r\nLR04Ukl51VD+dxC1z5QO0OmeBLtf7xtI7RJjHwurHr4F29iIHsukmZY9LHlX\r\nXMZkw830pztMcCmagt+r/E4mW/akTMp9ILJvPUzqr5Cz3up0Cyt+HTHom2HG\r\nrG0sbb+uhSqmTD38oZtA5DSbFJbAq2IUI0zKWasXb33gMmasFBLydCB6mR9V\r\nXh0ChEUMR1DTbxMxz/B7gjxqmABKyOFmgrx4LRfTEcdnFNHTxVP5+uLms+EG\r\n4kp7TBsFvvr/OWjPu02sCjmEAz8czXz89z0=\r\n=NdGX\r\n-----END PGP SIGNATURE-----\r\n","size":8410,"noattachment":false,"key":"/@opentelemetry/exporter-metrics-otlp-proto/-/@opentelemetry/exporter-metrics-otlp-proto-0.29.1.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.12.0"},"gitHead":"094f016ac6697fc45ba5d7b5765f5c3e56f18d1e","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/3.22.1/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":{},"_nodeVersion":"14.18.1","dependencies":{"protobufjs":"^6.9.0","@grpc/proto-loader":"0.6.9","@opentelemetry/core":"1.3.0","@opentelemetry/resources":"1.3.0","@opentelemetry/otlp-transformer":"0.29.1","@opentelemetry/sdk-metrics-base":"0.29.1","@opentelemetry/otlp-exporter-base":"0.29.1","@opentelemetry/otlp-proto-exporter-base":"0.29.1","@opentelemetry/exporter-metrics-otlp-http":"0.29.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"cpx":"1.5.0","nyc":"15.1.0","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@babel/core":"7.16.0","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6","@opentelemetry/api":"^1.0.0","@opentelemetry/api-metrics":"0.29.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/exporter-metrics-otlp-proto_0.29.1_1654107187577_0.8874664438140469","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":1654107187757,"_cnpm_publish_time":1654107187757,"dist-tags":{"canary":"0.300.0-rc.0","latest":"0.301.0","next":"0.34.0"}}