Using @otel/sdk-metrics-base
with @otel/exporter-metrics-otlp-http
#2749
-
I'm trying to use under Node.js: import {
MeterProvider,
ConsoleMetricExporter,
} from '@opentelemetry/sdk-metrics-base';
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http';
import { PrometheusExporter } from '@opentelemetry/exporter-prometheus';
const exporter = new OTLPMetricExporter();
console.info('Enabling OTLP Metrics Exporter to', exporter.getDefaultUrl({}));
return new MeterProvider({
exporter,
interval: 1000,
}); with my environment, I get:
but when (for debugging) I first listen on port 4317, nothing ever connects to it. Here are my module versions:
Using the Prometheus exporter, the metrics are made available for scraping correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I found a similar no-network-connection behaviour when attempting to use |
Beta Was this translation helpful? Give feedback.
-
I'm silly, the otel initialisation code wasn't enabled from within my app. Forgive the noise. |
Beta Was this translation helpful? Give feedback.
I'm silly, the otel initialisation code wasn't enabled from within my app. Forgive the noise.