0.2.5 • Published 7 months ago

graphql-eventbus-metrics-plugin v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Metrics Plugin for GraphQL Eventbus

Metrics plugin prometheus metrics for your GraphQL Eventbus. To use it, you must have installed prom-client required as a npm peer dependency.

npm i graphql-eventbus-metrics-plugin
# Peer dependency
npm i prom-client
import { MetricsPlugin } from 'graphql-eventbus-metrics-plugin'
const myBus = new MyBus({
  ...,
  plugins: [MetricsPlugin()]
})
import { register } from "prom-client";
import * as express from "express";

const app = express();
app.get("/metrics", async (_, res) => {
  res.set("Content-Type", register.contentType);
  res.send(await register.metrics());
});

This plugins exposes the follwing metrics:

message_published_total

The number of messages published without error

message_published_error_total

The number of messages published that have encountered errors.

message_consumed_total

The number of messages published that have encountered errors.

message_consumed_error_total

The number of messages consumed that encountered an error

message_consumed_duration_ms

The time to consume a message successfully

message_consumed_since_publish_duration_ms

The time to consume a message successfully since it was first published. We track this metrics using publishedAt field in the GraphQLEventbusMetadata.

message_publish_duration_ms

The time it takes to publish a message in ms.

0.2.5

7 months ago

0.2.4

8 months ago

0.2.3

11 months ago

0.2.2

1 year ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.18-alpha.3

3 years ago

0.0.18-alpha.0

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago