Open hpsmatheus opened 3 years ago
I get the same issue. It seems to be that prom-client@12.0.0
introduced these breaking changes. Looking at the source ^13
might be a fix to the issue but I haven't tested it yet.
Seem's it's still a problem in prom-client 13.1.0. If I provide a default configuration for buckets it seems to stop throwing this error.
e.g.
this.promService.getHistogram({
name: 'graphql_total_request_time',
help: 'The time to complete a GraphQL query.',
labelNames: ['operationName', 'operation'],
buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10],
});
I have the following histogram
but if I remove the
labelNames
param, I get this error when starting the applicationAnd if I remove the
buckets
param, I get this errorI'm trying to remove these params because the
IHistogramMetricArguments
says they are not required.I'm using version 1.0.0