JSPM

@ahkui/opentelemetry-node-metrics

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q28965F
  • License Apache-2.0

An adoption of the node process metrics of prom-client

Package Exports

  • @ahkui/opentelemetry-node-metrics
  • @ahkui/opentelemetry-node-metrics/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ahkui/opentelemetry-node-metrics) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

opentelemetry-node-metrics

This module is an adoption of the metric set of prom-client for @opentelemetry/api.

Usage

const { metrics } = require('@opentelemetry/api');
const { setupNodeMetrics } = require('@ahkui/opentelemetry-node-metrics');

setupNodeMetrics(metrics.getMeterProvider());

or

import { metrics } from '@opentelemetry/api';
import { setupNodeMetrics } from '@ahkui/opentelemetry-node-metrics';

setupNodeMetrics(metrics.getMeterProvider());

License

This project heavily relies on code from siimon/prom-client and marcbachmann/opentelemetry-node-metrics and therefore I'd like to thank to all the contributors.

The prom-client project is using an APACHE v2.0 LICENSE and threfore it's best to apply the same license to this project.

This module is only a proof of concept to get opentelemetry to work with the metrics support of prom-client.