Fix deprecated OTEL API
This commit is contained in:
parent
d7edb2f8fe
commit
971077bccd
|
@ -51,14 +51,15 @@ class OpenTelemetryMetrics {
|
|||
const provider = new MeterProvider({
|
||||
views: [
|
||||
...NodeJSObserversBuilder.getViews()
|
||||
],
|
||||
readers: [
|
||||
new PrometheusExporter({
|
||||
host: CONFIG.OPEN_TELEMETRY.METRICS.PROMETHEUS_EXPORTER.HOSTNAME,
|
||||
port: CONFIG.OPEN_TELEMETRY.METRICS.PROMETHEUS_EXPORTER.PORT
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
provider.addMetricReader(new PrometheusExporter({
|
||||
host: CONFIG.OPEN_TELEMETRY.METRICS.PROMETHEUS_EXPORTER.HOSTNAME,
|
||||
port: CONFIG.OPEN_TELEMETRY.METRICS.PROMETHEUS_EXPORTER.PORT
|
||||
}))
|
||||
|
||||
metrics.setGlobalMeterProvider(provider)
|
||||
|
||||
this.meter = metrics.getMeter('default')
|
||||
|
|
Loading…
Reference in New Issue