@envelop/prometheus
Advanced tools
Comparing version 12.0.0-alpha-20241121212552-d3f8fd955ff7dfb90d7991a650e7437c6c55173e to 12.0.0-alpha-20241121213311-3d02e4cba3e184302db37ee94ea3af1002dda3fe
{ | ||
"name": "@envelop/prometheus", | ||
"version": "12.0.0-alpha-20241121212552-d3f8fd955ff7dfb90d7991a650e7437c6c55173e", | ||
"version": "12.0.0-alpha-20241121213311-3d02e4cba3e184302db37ee94ea3af1002dda3fe", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
@@ -0,3 +1,4 @@ | ||
import type { GraphQLResolveInfo } from 'graphql'; | ||
import { Registry } from 'prom-client'; | ||
import { createCounter, createHistogram, createSummary, type AtLeastOne, type FillLabelsFnParams } from './utils.js'; | ||
import { createCounter, createHistogram, createSummary, type AtLeastOne, type DeprecatedFieldInfo, type FillLabelsFnParams } from './utils.js'; | ||
export type PrometheusTracingPluginConfig = { | ||
@@ -153,3 +154,6 @@ /** | ||
*/ | ||
graphql_envelop_error_result?: CounterMetricOption<'parse' | 'validate' | 'context' | 'execute' | 'subscribe'>; | ||
graphql_envelop_error_result?: CounterMetricOption<'parse' | 'validate' | 'context' | 'execute' | 'subscribe', string, FillLabelsFnParams & { | ||
error: unknown; | ||
errorPhase: 'parse' | 'validate' | 'context' | 'execute' | 'subscribe'; | ||
}>; | ||
/** | ||
@@ -165,3 +169,5 @@ * This metric tracks the number of deprecated fields used in the GraphQL operation. | ||
*/ | ||
graphql_envelop_deprecated_field?: CounterMetricOption<'parse'>; | ||
graphql_envelop_deprecated_field?: CounterMetricOption<'parse', string, FillLabelsFnParams & { | ||
deprecationInfo: DeprecatedFieldInfo; | ||
}>; | ||
/** | ||
@@ -180,3 +186,3 @@ * This metric tracks the number of schema changes that have occurred since the gateway started. | ||
*/ | ||
graphql_envelop_schema_change?: CounterMetricOption<'schema'>; | ||
graphql_envelop_schema_change?: CounterMetricOption<'schema', string, {}>; | ||
/** | ||
@@ -196,3 +202,5 @@ * This metric tracks the duration of each resolver execution. | ||
*/ | ||
graphql_envelop_execute_resolver?: HistogramMetricOption<'subscribe' | 'execute'>; | ||
graphql_envelop_execute_resolver?: HistogramMetricOption<'subscribe' | 'execute', string, FillLabelsFnParams & { | ||
info: GraphQLResolveInfo; | ||
}>; | ||
}; | ||
@@ -199,0 +207,0 @@ export type LabelsConfig = { |
Sorry, the diff of this file is not supported yet
144932
1933