{"_id":"@opentelemetry/exporter-prometheus@0.300.0-development.0","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6801b48a68ae0abebe496f45621c5d4c0d8234c8","tarball":"http://registry-npm.ywwl.com/@opentelemetry/exporter-prometheus/download/@opentelemetry/exporter-prometheus-0.300.0-development.0.tgz","fileCount":31,"integrity":"sha512-ZICKz/wKuFcd1BeClupqDuxu/cO+Qti+A/yeEkZeZvZ4HT5VkXIQQf4IozbD9BHBu8C+AjxEb2vZvO5hykOJHw==","signatures":[{"sig":"MEQCIDPLNmMlEuQZY5WaBrRywbW5eGwuRVFAwYt4oOr9R+wUAiAx2Rr9hAE/i45LOkXnBgd/eq8cWwJPuUkQaJ6YNJys6Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGp0IWLD4rJP0M7eiZo+mOqQvOfhOo0ltv++uuhh8jTlAiEA7e0/I5sr4C1BYtG204w+fhxwF2mFKhEjW8M3bW5uhgI="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fexporter-prometheus@0.300.0-development.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":116346,"size":24864,"noattachment":false,"key":"/@opentelemetry/exporter-prometheus/-/@opentelemetry/exporter-prometheus-0.300.0-development.0.tgz"},"main":"./dist/index.cjs","name":"@opentelemetry/exporter-prometheus","types":"./dist/index.d.cts","author":{"name":"OpenTelemetry Authors"},"engines":{"node":">=22.15.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"ad3499bf70ee996f5565e5cd00f2c5fcb2e87042","license":"Apache-2.0","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint .","test":"nyc mocha 'test/**/*.test.ts'","clean":"rimraf dist build","watch":"tsdown --watch --no-clean","compile":"tsdown","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --fix","align-api-deps":"node ../../../scripts/align-api-deps.mjs","peer-api-check":"node ../../../scripts/peer-api-check.mjs","prepublishOnly":"npm run compile"},"version":"0.300.0-development.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:dddee181-fbcb-4c01-bcc9-c967f486672a"}},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-prometheus","keywords":["opentelemetry","nodejs","tracing","profiling"],"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/10.0.1/node@v24.20.0+x64 (linux)","description":"OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus","directories":{},"maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"@opentelemetry/core":"3.0.0-development.0","@opentelemetry/resources":"3.0.0-development.0","@opentelemetry/sdk-metrics":"3.0.0-development.0","@opentelemetry/semantic-conventions":"^1.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"17.1.0","mocha":"11.8.0","sinon":"18.0.1","typescript":"5.2.2","@types/node":"18.19.130","@types/mocha":"10.0.10","@types/sinon":"17.0.4","@opentelemetry/api":"1.9.1"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/exporter-prometheus_0.300.0-development.0_1790005154074_0.7762141847464838"},"readme":"# OpenTelemetry Prometheus Metric Exporter\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\nThe OpenTelemetry Prometheus Metrics Exporter allows the user to send collected [OpenTelemetry Metrics](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics) to Prometheus.\n\n[Prometheus](https://prometheus.io/) is a monitoring system that collects metrics, by scraping exposed endpoints at regular intervals, evaluating rule expressions. It can also trigger alerts if certain conditions are met. For assistance setting up Prometheus, [click here for a guided codelab](https://opencensus.io/codelabs/prometheus/#0).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/sdk-metrics\nnpm install --save @opentelemetry/exporter-prometheus\n```\n\n## Usage\n\nCreate & register the exporter on your application.\n\n```js\nconst { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');\nconst { MeterProvider }  = require('@opentelemetry/sdk-metrics');\n\n// Add your port and startServer to the Prometheus options\nconst options = {port: 9464};\nconst exporter = new PrometheusExporter(options);\n\n// Creates MeterProvider and installs the exporter as a MetricReader\nconst meterProvider = new MeterProvider({\n  readers: [exporter],\n});\nconst meter = meterProvider.getMeter('example-prometheus');\n\n// Now, start recording data\nconst counter = meter.createCounter('metric_name', {\n  description: 'Example of a counter'\n});\ncounter.add(10, { pid: process.pid });\n\n// .. some other work\n```\n\n## Viewing your metrics\n\nWith the above you should now be able to navigate to the Prometheus UI at: <http://localhost:9464/metrics>\n\nMetrics from different instrumentation scopes that translate to the same Prometheus metric name are exported together, with one set of metadata. Scope labels distinguish their samples by default. If descriptions or units conflict, the exporter selects the first non-empty value and logs a warning. If metric types conflict, the entire family is omitted and a warning is logged.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- To learn more about Prometheus, visit: <https://prometheus.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-prometheus\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fexporter-prometheus.svg\n","publish_time":1790005154145,"_cnpm_publish_time":1790005154145,"dist-tags":{"canary":"0.300.0-rc.0","latest":"0.301.0","next":"0.34.0"}}