未验证 提交 073fbbca 编写于 作者: W Wing 提交者: GitHub

Refine event.md (#6622)

上级 51b60ae2
......@@ -2,43 +2,43 @@
SkyWalking already supports the three pillars of observability, namely logs, metrics, and traces.
In reality, a production system experiences many other events that may affect the performance of the system, such as upgrading, rebooting, chaos testing, etc.
Although some of these events are reflected in the logs, there are many other events that can not. Hence, SkyWalking provides a more native way to collect these events.
This doc covers the design of how SkyWalking collects events and what events look like in SkyWalking.
Although some of these events are reflected in the logs, many others are not. Hence, SkyWalking provides a more native way to collect these events.
This doc details how SkyWalking collects events and what events look like in SkyWalking.
## How to Report Events
SkyWalking backend supports three protocols to collect events, gRPC, HTTP, and Kafka. Any agent or CLI that implements one of these protocols can report events to SkyWalking.
The SkyWalking backend supports three protocols to collect events: gRPC, HTTP, and Kafka. Any agent or CLI that implements one of these protocols can report events to SkyWalking.
Currently, the officially supported clients to report events are:
- [ ] Java Agent Toolkit: Use the Java agent toolkit to report events from inside the applications.
- [x] SkyWalking CLI: Use the CLI to report events from the command line interface.
- [ ] Kubernetes Event Exporter: Deploy an event exporter to refine and report Kubernetes events.
- [ ] Java Agent Toolkit: Using the Java agent toolkit to report events within the applications.
- [x] SkyWalking CLI: Using the CLI to report events from the command line interface.
- [ ] Kubernetes Event Exporter: Deploying an event exporter to refine and report Kubernetes events.
## Event Definition
## Event Definitions
An event contains the following fields. The definitions of event can be found at the [protocol repo](https://github.com/apache/skywalking-data-collect-protocol/tree/master/event)
An event contains the following fields. The definitions of event can be found at the [protocol repo](https://github.com/apache/skywalking-data-collect-protocol/tree/master/event).
### UUID
Unique ID of the event. Because an event may span a long period of time, the UUID is necessary to associate the start time with the end time of the same event.
Unique ID of the event. Since an event may span a long period of time, the UUID is necessary to associate the start time with the end time of the same event.
### Source
The source object that the event occurs on. In the concepts of SkyWalking, the object is typically service, service instance, etc.
The source object on which the event occurs. In SkyWalking, the object is typically a service, service instance, etc.
### Name
The name of the event. For example, `Start`, `Stop`, `Crash`, `Reboot`, `Upgrade` etc.
Name of the event. For example, `Start`, `Stop`, `Crash`, `Reboot`, `Upgrade`, etc.
### Type
The type of the event. This field is friendly for UI visualization, where events of type `Normal` are considered as normal operations,
while `Error` is considered as unexpected operations, such as `Crash` events, therefore we can mark them with different colors to be easier identified.
Type of the event. This field is friendly for UI visualization, where events of type `Normal` are considered normal operations,
while `Error` is considered unexpected operations, such as `Crash` events. Marking them with different colors allows us to more easily identify them.
### Message
The detail of the event that describes why this event happened. This should be a one-line message that briefly describes why the event is reported. Examples of an `Upgrade` event may be something like `Upgrade from ${from_version} to ${to_version}`.
It's NOT encouraged to include the detailed logs of this event, such as the exception stack trace.
It's NOT recommended to include the detailed logs of this event, such as the exception stack trace.
### Parameters
......@@ -50,7 +50,7 @@ The start time of the event. This field is mandatory when an event occurs.
### End Time
The end time of the event. This field may be empty if the event has not stopped yet, otherwise it should be a valid timestamp after `startTime`.
The end time of the event. This field may be empty if the event has not ended yet, otherwise there should be a valid timestamp after `startTime`.
**NOTE:** When reporting an event, you typically call the report function twice, one for starting of the event and the other one for ending of the event, with the same UUID.
There are also cases where you have both the start time and end time already, for example, when exporting events from a 3rd-party system, the start time and end time are already known so that you can call the report function only once.
**NOTE:** When reporting an event, you typically call the report function twice, the first time for starting of the event and the second time for ending of the event, both with the same UUID.
There are also cases where you would already have both the start time and end time. For example, when exporting events from a third-party system, the start time and end time are already known so you may simply call the report function once.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册