DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
609 stars 302 forks source link

statsd.event() payload is too big (more than 8KB), event discarded #698

Open natasha-aleksandrova opened 2 years ago

natasha-aleksandrova commented 2 years ago

Describe the bug We are seeing errors when sending an event using statsd.event() as "payload is too big" The event payload itself is very small - from looking at the code this maybe be due to all of the tags that are being appended?

When I see good events in datadog there are a lot of tags that get auto-appended besides just the two custom ones I set (env and application).

Is there any way to control not adding all of the default tags to avoid hitting the max size or anything else can be done to avoid getting into this situation?

Expected behavior Being able to successfully send a very small event to datadog.

Environment and Versions (please complete the following information): python3.9 datadog==0.42.0

github-actions[bot] commented 2 years ago

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.

natasha-aleksandrova commented 2 years ago

this is still an issue

sgnn7 commented 2 years ago

Hi @natasha-aleksandrova,

Apologies for the delay. The size of the message is directly related to the size of the packet that is being sent. Since the default and additional-to-event tags are appended to the message and those are generally controlled by the user, the general guidance is that you would:

8k characters in general is quite enough space for tags and message so I would guess that the event name/text may be overrunning the limit rather than the tags but it really depends on your use case. You should be able to create a new instance of DogStatsd with no default tags to send an event where you want to reduce the default tags.