@graphql-yoga/plugin-prometheus 2.0.3 → 2.0.4-alpha-20230810153432-d9f7d423
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +2 -2
- package/esm/index.js +2 -2
- package/package.json +3 -3
- package/typings/index.d.cts +1 -1
- package/typings/index.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.usePrometheus = exports.createSummary = exports.createHistogram = exports.createCounter = void 0;
|
|
4
|
+
const graphql_1 = require("graphql");
|
|
5
|
+
const prom_client_1 = require("prom-client");
|
|
4
6
|
const prometheus_1 = require("@envelop/prometheus");
|
|
5
7
|
Object.defineProperty(exports, "createCounter", { enumerable: true, get: function () { return prometheus_1.createCounter; } });
|
|
6
8
|
Object.defineProperty(exports, "createHistogram", { enumerable: true, get: function () { return prometheus_1.createHistogram; } });
|
|
7
9
|
Object.defineProperty(exports, "createSummary", { enumerable: true, get: function () { return prometheus_1.createSummary; } });
|
|
8
|
-
const graphql_1 = require("graphql");
|
|
9
|
-
const prom_client_1 = require("prom-client");
|
|
10
10
|
function usePrometheus(options) {
|
|
11
11
|
const endpoint = options.endpoint || '/metrics';
|
|
12
12
|
const registry = options.registry || prom_client_1.register;
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { usePrometheus as useEnvelopPrometheus, createCounter, createHistogram, createSummary, } from '@envelop/prometheus';
|
|
2
1
|
import { getOperationAST } from 'graphql';
|
|
3
|
-
import {
|
|
2
|
+
import { register as defaultRegistry, Histogram } from 'prom-client';
|
|
3
|
+
import { createCounter, createHistogram, createSummary, usePrometheus as useEnvelopPrometheus, } from '@envelop/prometheus';
|
|
4
4
|
export { createCounter, createHistogram, createSummary };
|
|
5
5
|
export function usePrometheus(options) {
|
|
6
6
|
const endpoint = options.endpoint || '/metrics';
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-yoga/plugin-prometheus",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4-alpha-20230810153432-d9f7d423",
|
|
4
4
|
"description": "Prometheus plugin for GraphQL Yoga.",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"prom-client": "^13 || ^14.0.0",
|
|
7
6
|
"graphql": "^15.2.0 || ^16.0.0",
|
|
8
|
-
"graphql-yoga": "
|
|
7
|
+
"graphql-yoga": "4.0.4-alpha-20230810153432-d9f7d423",
|
|
8
|
+
"prom-client": "^13 || ^14.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@envelop/prometheus": "8.0.0"
|
package/typings/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PrometheusTracingPluginConfig as EnvelopPrometheusTracingPluginConfig, createCounter, createHistogram, createSummary, FillLabelsFnParams } from '@envelop/prometheus';
|
|
2
1
|
import { Plugin } from 'graphql-yoga';
|
|
2
|
+
import { createCounter, createHistogram, createSummary, PrometheusTracingPluginConfig as EnvelopPrometheusTracingPluginConfig, FillLabelsFnParams } from '@envelop/prometheus';
|
|
3
3
|
export { createCounter, createHistogram, createSummary, FillLabelsFnParams };
|
|
4
4
|
export interface PrometheusTracingPluginConfig extends EnvelopPrometheusTracingPluginConfig {
|
|
5
5
|
http?: boolean | ReturnType<typeof createHistogram>;
|
package/typings/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PrometheusTracingPluginConfig as EnvelopPrometheusTracingPluginConfig, createCounter, createHistogram, createSummary, FillLabelsFnParams } from '@envelop/prometheus';
|
|
2
1
|
import { Plugin } from 'graphql-yoga';
|
|
2
|
+
import { createCounter, createHistogram, createSummary, PrometheusTracingPluginConfig as EnvelopPrometheusTracingPluginConfig, FillLabelsFnParams } from '@envelop/prometheus';
|
|
3
3
|
export { createCounter, createHistogram, createSummary, FillLabelsFnParams };
|
|
4
4
|
export interface PrometheusTracingPluginConfig extends EnvelopPrometheusTracingPluginConfig {
|
|
5
5
|
http?: boolean | ReturnType<typeof createHistogram>;
|