You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.
the address 0.0.0.0 is a non-routable meta-address used to designate an invalid, unknown or non-applicable target
so I would argue that this value does not follow the specification (it is not the name of any valid host).
Steps to reproduce
Follow the instructions here and add a logging exporter to the pipeline with logLevel debug (see below for full config). Run the Collector and wait a few seconds.
What did you expect to see?
The internal metrics had a valid hostname or no hostname at all.
What did you see instead?
Metric payloads had the host.name attribute set to 0.0.0.0. For example:
Resource labels:
-> service.name: STRING(otelcol)
-> host.name: STRING(0.0.0.0)
-> instance: STRING(0.0.0.0:8888)
-> port: STRING(8888)
-> scheme: STRING(http)
-> job: STRING(otelcol)
InstrumentationLibraryMetrics #0
InstrumentationLibrary
Metric #0
Descriptor:
-> Name: otelcol_exporter_enqueue_failed_log_records
-> Description: Number of log records failed to be added to the sending queue.
-> Unit:
-> DataType: Sum
-> IsMonotonic: true
-> AggregationTemporality: AGGREGATION_TEMPORALITY_CUMULATIVE
NumberDataPoints #0
Data point attributes:
-> exporter: STRING(logging)
-> service_instance_id: STRING(5e515c71-b05f-4735-88a8-9ecf5a4db707)
-> service_version: STRING(latest)
StartTimestamp: 2021-11-30 15:21:30.96 +0000 UTC
Timestamp: 2021-11-30 15:21:30.96 +0000 UTC
Value: 0.000000
What version did you use?
Version: 61b5600 What config did you use?
Config:
I had a similar discussion on a recent PR, and the takeaway is that 0.0.0.0 on the client-side can be safely switched by 127.0.0.1, as it's the one IP that is always present. Given that 0.0.0.0 represents all the IPs on the host, 127.0.0.1 is part of that set.
Describe the bug
When scraping internal metrics as documented here the metrics have a
0.0.0.0
hostname attribute set. Thehost.name
semantic convention is described in the OpenTelemetry specification as:As e.g. Wikipedia says,
so I would argue that this value does not follow the specification (it is not the name of any valid host).
Steps to reproduce
Follow the instructions here and add a logging exporter to the pipeline with
logLevel
debug (see below for full config). Run the Collector and wait a few seconds.What did you expect to see?
The internal metrics had a valid hostname or no hostname at all.
What did you see instead?
Metric payloads had the
host.name
attribute set to0.0.0.0
. For example:What version did you use?
Version: 61b5600
What config did you use?
Config:
Environment
not relevant (happens on any environment).
Additional context
This attribute is added by this function:
opentelemetry-collector-contrib/receiver/prometheusreceiver/internal/prom_to_otlp.go
Lines 24 to 39 in 61b5600
cc @Aneurysm9 @dashpole as CODEOWNERS
The text was updated successfully, but these errors were encountered: