Nestjs-OpenTelemetry
Nestjs-OpenTelemetry copied to clipboard
Error in configuring for PrometheusExporter
According to the README, the code below should result in configuring a PrometheusExporter, but perhaps there is a missing step or the versions with the required libraries are a little out of alignment? The IDE reports an error.
OpenTelemetryModule.forRoot({
applicationName: 'myApplicationName',
metricExporter: new PrometheusExporter({
endpoint: 'metrics',
port: 9464,
}),
metricInterval: 1000,
})
Error
Property 'export' is missing in type 'PrometheusExporter' but required in type 'MetricExporter'.ts(2741)
types.d.ts(71, 5): 'export' is declared here.
types.d.ts(13, 5): The expected type comes from property 'metricExporter' which is declared here on type 'Partial<OpenTelemetryModuleConfig>'
It seems that the PrometheusExporter
extends MetricReader
(now?) while the OpenTelemetryModule
is expecting to have a MetricExporter
.
:eyes:
Last version without problems is 0.27.0
Thanks! Are there any plans to support newer versions?
Also having this issue, any idea on how to adjust configs for this?
#49