Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Refinery Metrics and Logs don't support the REFINERY_API_HOST environment variable #1439

Open
tdarwin opened this issue Nov 19, 2024 · 0 comments
Labels
type: enhancement New feature or request

Comments

@tdarwin
Copy link
Contributor

tdarwin commented Nov 19, 2024

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

  1. 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.

@tdarwin tdarwin added the type: bug Something isn't working label Nov 19, 2024
@kentquirk kentquirk added type: enhancement New feature or request and removed type: bug Something isn't working labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants