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
I came to this while processing OTEL log messages. When host.name OTEL attribute is present in the resource attributes, it is converted to Host.Hostname field:
// kubernetes.* is set, but kubernetes.node.name is not: don't set host.hostname at all.
event.Host.Hostname=""
}
default:
// Otherwise use the originally specified host.hostname value.
The code is there for years (previously in apm-server repo), so I believe this was done to fill some information APM agent did not have.
I discovered this by setting k8s.pod.name from host.name attribute in OTEL Collector to fill some missing information manually and suddenly the smartresource column in Kibana Logs stopped showing any host name. This looks like a bug to me.
I also discovered that the value of OTEL attribute host.name has no influence on Kibana Logs resource column display and it always shows k8s.node.name when present. For us more valuable is to actually show k8s.pod.name, so we know the originating instance, not the Kubernetes Node with many PODs. Showing the Node name serving many PODs does not make much sense for us actually.
I think it would make sense to keep the Host.Hostname value as-is in case it is non-empty. So no overwriting, no clearing.
The text was updated successfully, but these errors were encountered:
I came to this while processing OTEL log messages. When
host.name
OTEL attribute is present in the resource attributes, it is converted toHost.Hostname
field:apm-data/input/otlp/metadata.go
Lines 173 to 177 in 46f8e38
That is fine. But when there is any k8s attribute present, it is either rewritten, or even cleared in post-processing phase:
apm-data/model/modelprocessor/hostname.go
Lines 41 to 53 in 46f8e38
The code is there for years (previously in apm-server repo), so I believe this was done to fill some information APM agent did not have.
I discovered this by setting
k8s.pod.name
fromhost.name
attribute in OTEL Collector to fill some missing information manually and suddenly the smartresource
column in Kibana Logs stopped showing any host name. This looks like a bug to me.I also discovered that the value of OTEL attribute
host.name
has no influence on Kibana Logsresource
column display and it always showsk8s.node.name
when present. For us more valuable is to actually showk8s.pod.name
, so we know the originating instance, not the Kubernetes Node with many PODs. Showing the Node name serving many PODs does not make much sense for us actually.I think it would make sense to keep the
Host.Hostname
value as-is in case it is non-empty. So no overwriting, no clearing.The text was updated successfully, but these errors were encountered: