grafana / agent

Vendor-neutral programmable observability pipelines.
https://grafana.com/docs/agent/
Apache License 2.0
1.6k stars 488 forks source link

Flow API: empty exports not returned from the API #2205

Closed rfratto closed 1 year ago

rfratto commented 2 years ago

If a component has a zero value for everything in its exports, the entire exports section is omitted from the API result.

This might mislead users, since it makes it seem like those components don't have any exported fields.

tpaschalis commented 1 year ago

This might be a bit harder to encounter now that many components export capsules (like a Receiver or RelabelRules); a simple way to check this is make local.file point to an empty file.

rfratto commented 1 year ago

This is closely related to #2206, where a fix for that will also probably resolve this.