Is it possible to rename Dynatrace OTel collector with a Windows host name

I have a Dynatrace OTel collector installed on a Windows VM and have enabled OTel collector self-health check. However in the out of the box OTel dashboard, I see the service name as dynatrace-otel-collector even if they are installed in separate VMs. Is it possible to rename the service name to reflect the hostname so we can distinguish the data based on hostnames?

Hi,
You can try updating your otel-collector-config.yaml and add a resource processor to override service.name with the host name:

processors:
  resource:
    attributes:
      - key: service.name
        from_attribute: host.name
        action: upsert

Make sure the processor is used in the pipeline:

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]

Alternatively, you can set the service name manually per VM, for example:

processors:
  resource:
    attributes:
      - key: service.name
        value: dynatrace-otel-collector-${HOSTNAME}
        action: upsert

I did give that config a shot but it doesn’t seem to work.