You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/component-status.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The system defines six statuses, listed in the table below:
12
12
| OK | The component is running without issue. |
13
13
| RecoverableError | The component has experienced a transient error and may recover. |
14
14
| PermanentError | The component has detected a condition at runtime that will need human intervention to fix. The collector will continue to run in a degraded mode. |
15
+
| FatalError | A component has experienced a fatal error and the collecctor will shutdown. |
15
16
| Stopping | The component is in the process of shutting down. |
16
17
| Stopped | The component has completed shutdown. |
17
18
@@ -26,6 +27,7 @@ Statuses can be categorized into two groups: lifecycle and runtime.
26
27
- OK
27
28
- RecoverableError
28
29
- PermanentError
30
+
- FatalError
29
31
30
32
### Transitioning Between Statuses
31
33
@@ -34,17 +36,17 @@ There is a finite state machine underlying the status reporting API that governs
The finite state machine ensures that components progress through the lifecycle properly and it manages transitions through runtime states so that components do not need to track their state internally. Only changes in status result in new events being generated; repeat reports of the same status are ignored. PermanentError is a permanent runtime state. A component in this state can transition to Stopping, but not to OK or RecoverableError.
39
+
The finite state machine ensures that components progress through the lifecycle properly and it manages transitions through runtime states so that components do not need to track their state internally. Only changes in status result in new events being generated; repeat reports of the same status are ignored. PermanentError and FatalError are permanent runtime states. A component in these states cannot make any further state transitions.
The collector is responsible for starting and stopping components. Since it knows when these events occur and their outcomes, it can automate status reporting of lifecycle events for components.
45
+
The collector's service implementation is responsible for starting and stopping components. Since it knows when these events occur and their outcomes, it can automate status reporting of lifecycle events for components.
44
46
45
47
**Start**
46
48
47
-
The collector will report a Starting event when starting a component. If an error is returned from Start, the collector will report a PermanentError event. If start returns without an error and the collector hasn't reported status itself, the collector will report an OK event.
49
+
The collector will report a Starting event when starting a component. If an error is returned from Start, the collector will report a PermanentError event. If start returns without an error and the component hasn't reported status itself, the collector will report an OK event.
48
50
49
51
**Shutdown**
50
52
@@ -67,7 +69,7 @@ We intend to define guidelines to help component authors distinguish between rec
67
69
68
70
A component should never have to report explicit status during shutdown. Automated status reporting should handle all cases. To recap, the collector will report Stopping before Shutdown is called. If a component returns an error from shutdown the collector will report a PermanentError and it will report Stopped if Shutdown returns without an error.
69
71
70
-
### In the Weeds
72
+
### Implmentation Details
71
73
72
74
There are a couple of implementation details that are worth discussing for those who work on or wish to understand the collector internals.
0 commit comments