Skip to content

Commit c78c992

Browse files
authored
Merge pull request DataDog#10987 from DataDog/olivierg/dogstatsd-event-header
Fix DogStatsD Event header lengths.
2 parents de3ca4d + 3c0e848 commit c78c992

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/en/developers/dogstatsd/datagram_shell.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ further_reading:
1616
text: 'DogStatsD source code'
1717
---
1818

19-
This section specifies the raw datagram format for metrics, events, and service checks that DogStatsD accepts. This isn't required reading if you're using any of [the DogStatsD client libraries][1]; however, if you want to write your own library, or use the shell to send metrics, then read on.
19+
This section specifies the raw datagram format for metrics, events, and service checks that DogStatsD accepts. The raw datagrams are encoded in UTF-8. This isn't required reading if you're using any of [the DogStatsD client libraries][1]; however, if you want to write your own library, or use the shell to send metrics, then read on.
2020

2121
{{< tabs >}}
2222
{{% tab "Metrics" %}}
@@ -47,13 +47,15 @@ Here are some example datagrams:
4747
{{% /tab %}}
4848
{{% tab "Events" %}}
4949

50-
`_e{<TITLE>.length,<TEXT>.length}:<TITLE>|<TEXT>|d:<TIMESTAMP>|h:<HOSTNAME>|p:<PRIORITY>|t:<ALERT_TYPE>|#<TAG_KEY_1>:<TAG_VALUE_1>,<TAG_2>`
50+
`_e{<TITLE_UTF8_LENGTH>,<TEXT_UTF8_LENGTH>}:<TITLE>|<TEXT>|d:<TIMESTAMP>|h:<HOSTNAME>|p:<PRIORITY>|t:<ALERT_TYPE>|#<TAG_KEY_1>:<TAG_VALUE_1>,<TAG_2>`
5151

5252
| Parameter | Required | Description |
5353
| ------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------- |
5454
| `_e` | Yes | The datagram must begin with `_e`. |
5555
| `<TITLE>` | Yes | The event title. |
5656
| `<TEXT>` | Yes | The event text. Insert line breaks with: `\\n`. |
57+
| `<TITLE_UTF8_LENGTH>` | Yes | The length of the UTF-8-encoded <TITLE> |
58+
| `<TEXT_UTF8_LENGTH>` | Yes | The length of the UTF-8-encoded <TEXT> |
5759
| `d:<TIMESTAMP>` | No | Add a timestamp to the event. The default is the current Unix epoch timestamp. |
5860
| `h:<HOSTNAME>` | No | Add a hostname to the event. No default. |
5961
| `k:<AGGREGATION_KEY>` | No | Add an aggregation key to group the event with others that have the same key. No default. |

0 commit comments

Comments
 (0)