Allow transitions between statuses with the same value (original) (raw)
Component(s)
service
Is your feature request related to a problem? Please describe.
The collector currently tracks component status changes using a state machine. Status transitions which the machine deems illegal are quietly dropped, and in particular are not propagated to status event consumers.
This is a problem for some advanced use cases, in particular those involving subcomponents:
- The current plan for reporting subcomponent status involves emitting status events with a particular attribute marking them as belonging to a subcomponent. If the subcomponent has the same status as its parent component, the event will be dropped.
- It's useful to emit an event with updated metadata even if the status doesn't change. For example, filelog receiver might want to indicate that a particular file cannot be read due to permissions without putting itself into a RecoverableError state.
- An exporter in a RecoverableError state may want to add more diagnostic information to its status. For example, if an otlp exporter cannot establish connection due to a DNS problem, it will put itself into a RecoverableError state with a message indicating the source of the problem. Later, if the DNS problem is resolved, but the the remote still can't be reached, it will want to remain in the same state, but update the message.
Describe the solution you'd like
I'd like component status transitions between statuses with the same value to be allowed by the collector. If we're concerned about emitting the same event multiple times due to a noisy component, we can deduplicate using a content hash. There isn't any indication this would be a problem at the moment, though - the only status event consumer is the healthcheckv2 extension, and it aggregates them.
Describe alternatives you've considered
There isn't much of an alternative. A workaround is emitting a different dummy status first to force the change, but that may have unforeseen consequences downstream.
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.