opentelemetry-js/examples/metrics
Mayur Kale d16c691dbe
feat: metric observer (#828)
* feat: metric observer

* chore: update after review

* chore: reviews

Co-authored-by: Mayur Kale <mayurkale@google.com>
2020-03-05 09:23:47 -08:00
..
metrics feat: metric observer (#828) 2020-03-05 09:23:47 -08:00
README.md feat: metric observer (#828) 2020-03-05 09:23:47 -08:00
package.json feat: metric observer (#828) 2020-03-05 09:23:47 -08:00

README.md

Overview

OpenTelemetry metrics allow a user to collect data and export it to a metrics backend like Prometheus.

This is a simple example that demonstrates basic metrics collection and exports those metrics to a Prometheus compatible endpoint.

Installation

$ # from this directory
$ npm install

How to setup Prometheus please check Setup Prometheus

Run the Application

  • Run the example

Observer

$ npm run start:observer

Prometheus

  1. In prometheus search for "metric_observer"
  1. Prometheus Scrape Endpoint http://localhost:9464/metrics
  2. Prometheus graph http://localhost:9090/graph

Example

LICENSE

Apache License 2.0