Skip to content

Commit

Permalink
chore(docs): Clarify when component received and sent bytes events sh…
Browse files Browse the repository at this point in the history
…ould be emitted (#17464)

Also refactors the event lists so that they each have an `Emission`
line.

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko authored May 22, 2023
1 parent 1f54415 commit 547783d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions docs/specs/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ _All components_ MUST emit a `ComponentEventsReceived` event that represents
the reception of Vector events from an upstream component.

- Emission
- MUST emit immediately after creating or receiving Vector events.
- MUST emit immediately after creating or receiving Vector events, before modification or metadata
is added.
- Properties
- `count` - The count of Vector events.
- `byte_size` - The estimated JSON byte size of all events received.
Expand All @@ -130,9 +131,11 @@ the reception of Vector events from an upstream component.

#### ComponentBytesReceived

*Sources* MUST emit a `ComponentBytesReceived` event immediately after receiving, decompressing
and filtering bytes from the upstream source and before the creation of a Vector event.
*Sources* MUST emit a `ComponentBytesReceived` event that represent the reception of bytes.

- Emission
- MUST emit immediately after receiving, decompressing and filtering bytes from the upstream
source and before the creation of a Vector event.
- Properties
- `byte_size`
- For UDP, TCP, and Unix protocols, the total number of bytes received from
Expand All @@ -155,13 +158,13 @@ and filtering bytes from the upstream source and before the creation of a Vector

#### ComponentBytesSent

*Sinks* that send events downstream, MUST emit a `ComponentBytesSent` event immediately after
sending bytes to the downstream target, if the transmission was successful. The reported bytes MUST
be before compression.

Note that for sinks that simply expose data, but don't delete the data after
sending it, like the `prometheus_exporter` sink, SHOULD NOT publish this metric.
*Sinks* MUST emit a `ComponentBytesReceived` event that represent the transmission of bytes.

- Emission
- MUST emit a `ComponentBytesSent` event immediately after sending bytes to the downstream target,
if the transmission was successful. The reported bytes MUST be before compression.
- Note that sinks that simply expose data, but don't delete the data after sending it, like the
`prometheus_exporter` sink, SHOULD NOT emit this metric.
- Properties
- `byte_size`
- For UDP, TCP, and Unix protocols, the total number of bytes placed on the
Expand Down

0 comments on commit 547783d

Please sign in to comment.