Description
In Refinery 2.8.4 (and main), Refinery's file_config.go doesn't appear to reference the CmdEnv loading of the REFINERY_API_HOST for configuring sending Refinery telemetry to Honeycomb.
It looks like it loads correctly in the network config:
type NetworkConfig struct {
ListenAddr string `yaml:"ListenAddr" default:"0.0.0.0:8080" cmdenv:"HTTPListenAddr"`
PeerListenAddr string `yaml:"PeerListenAddr" default:"0.0.0.0:8081" cmdenv:"PeerListenAddr"`
HoneycombAPI string `yaml:"HoneycombAPI" default:"https://api.honeycomb.io" cmdenv:"HoneycombAPI"`
HTTPIdleTimeout Duration `yaml:"HTTPIdleTimeout"`
}
See the cmdenv:"HoneycombAPI"
But in the telemetry sections like [OTelMetricsConfig[(https://github.com/honeycombio/refinery/blob/fa1520ca28519393f9262126e96ad1a38d35b3dc/config/file_config.go#L270), that cmdenv
isn't referenced for the APIHost Option:
type OTelMetricsConfig struct {
Enabled bool `yaml:"Enabled" default:"false"`
APIHost string `yaml:"APIHost" default:"https://api.honeycomb.io"`
APIKey string `yaml:"APIKey" cmdenv:"OTelMetricsAPIKey,HoneycombAPIKey"`
Dataset string `yaml:"Dataset" default:"Refinery Metrics"`
Compression string `yaml:"Compression" default:"gzip"`
ReportingInterval Duration `yaml:"ReportingInterval" default:"30s"`
}
Versions
- Refinery: <= 2.8.4/main
Steps to reproduce
- Try to use the
REFINERY_API_HOST
environment variable to send metrics or logs of Refinery operations to Honeycomb.
Additional context
Not sure if this should use the same environment variable or not (probably should), but want to give the option of creating a REFINERY_TELEMETRY_API_HOST so that folks can send their Refinery telemetry to a different endpoint than they're sending their application telemetry.