Skip to content

Commit

Permalink
fix: make undefined the default host to include ipv6
Browse files Browse the repository at this point in the history
Signed-off-by: naseemkullah <naseem@transit.app>
  • Loading branch information
naseemkullah committed Jan 25, 2021
1 parent 0c41c43 commit c7fd0d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { PrometheusSerializer } from './PrometheusSerializer';
import { PrometheusLabelsBatcher } from './PrometheusLabelsBatcher';
export class PrometheusExporter implements MetricExporter {
static readonly DEFAULT_OPTIONS = {
host: process.env.OTEL_EXPORTER_PROMETHEUS_HOST ?? '0.0.0.0',
host: process.env.OTEL_EXPORTER_PROMETHEUS_HOST,
port: Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT) ?? 9464,
endpoint: '/metrics',
prefix: '',
Expand Down Expand Up @@ -157,7 +157,7 @@ export class PrometheusExporter implements MetricExporter {
},
() => {
this._logger.debug(
`Prometheus exporter server started: ${this._host}/${this._port}/${this._endpoint}`
`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`
);
resolve();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface ExporterConfig {
endpoint?: string;

/**
* @default '0.0.0.0'
* @default undefined (all interfaces)
*/
host?: string;

Expand Down

0 comments on commit c7fd0d7

Please sign in to comment.