Fix deprecated OTEL API
This commit is contained in:
parent
d7edb2f8fe
commit
971077bccd
1 changed files with 6 additions and 5 deletions
|
@ -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 a new issue