Skip to main content

vector_common/internal_event/
prelude.rs

1// Set of `stage` tags to use when emitting error events.
2pub mod error_stage {
3    pub const INITIALIZING: &str = "initializing";
4    pub const RECEIVING: &str = "receiving";
5    pub const PROCESSING: &str = "processing";
6    pub const SENDING: &str = "sending";
7}
8
9// Set of `error_type` tags to use when emitting error events.
10pub mod error_type {
11    // When the event acknowledgment failed.
12    pub const ACKNOWLEDGMENT_FAILED: &str = "acknowledgment_failed";
13    // When the external command called by the component failed.
14    pub const COMMAND_FAILED: &str = "command_failed";
15    // When a condition for the event to be valid failed.
16    // This is used for example when a field is missing or should be a string.
17    pub const CONDITION_FAILED: &str = "condition_failed";
18    // When a templated routing value fell outside its configured confinement boundary.
19    pub const CONFINEMENT_FAILED: &str = "confinement_failed";
20    // When the component received a request with missing or invalid authentication credentials.
21    pub const AUTHENTICATION_FAILED: &str = "authentication_failed";
22    // When the component or the service on which it depends is not configured properly.
23    pub const CONFIGURATION_FAILED: &str = "configuration_failed";
24    // When the component failed to connect to an external service.
25    pub const CONNECTION_FAILED: &str = "connection_failed";
26    // When the component failed to convert a value.
27    // For example, when converting from string to float.
28    pub const CONVERSION_FAILED: &str = "conversion_failed";
29    // When the component failed to convert an event to a structure required
30    // by the external service the event should be sent to.
31    pub const ENCODER_FAILED: &str = "encoder_failed";
32    // When the received event has an unexpected metric.
33    pub const INVALID_METRIC: &str = "invalid_metric";
34    // When the component was unable to perform an IO.
35    pub const IO_FAILED: &str = "io_failed";
36    // When the component is unable to parse a message to build an event.
37    pub const PARSER_FAILED: &str = "parser_failed";
38    // When the component was unable to read from the source.
39    pub const READER_FAILED: &str = "reader_failed";
40    // When the component was unable to perform a request or the request failed.
41    pub const REQUEST_FAILED: &str = "request_failed";
42    // When the component depends on a script that failed
43    pub const SCRIPT_FAILED: &str = "script_failed";
44    // When the component was unable to build a template or interpolate it.
45    pub const TEMPLATE_FAILED: &str = "template_failed";
46    // When an execution took longer than expected and failed.
47    pub const TIMED_OUT: &str = "timed_out";
48    // When the component was unable to write some data.
49    pub const WRITER_FAILED: &str = "writer_failed";
50}