prometheus_exporter icon indicating copy to clipboard operation
prometheus_exporter copied to clipboard

Instrumenting Worker Process: undefined method `hostname' for PrometheusExporter:Module

Open FinnIckler opened this issue 1 year ago • 0 comments

Hi!

I've got a custom worker process that is running separately from my Rails API (just under ruby). When I try adding

PrometheusExporter::Instrumentation::Process.start(type: WORKER_NAME, labels: { process: PROCESS_NUMBER })

I get the error

ERROR -- : PrometheusExporter::Instrumentation::Process Prometheus Exporter Failed To Collect Stats undefined method 'hostname' for PrometheusExporter:Module

Does this mean I cannot use PrometheusExporter::Instrumentation::Process for processes that do not have a hostname attached to them? Custom metrics still work fine.

Thanks for the help, Finn

FinnIckler avatar Jun 06 '23 15:06 FinnIckler