Commit 7451d93
committed
fix(dogstatsd): change stream handler task name to avoid unbounded cardinality (#1899)
As stated in the PR title.
For DSD stream handlers tasks, we were naming them like so: `dogstatsd-stream-handler-{}-{}`, where the first portion was the listener type (`udp`, `unix`, etc) and the second was a "stream index.". For UDP and UDS datagram, this basically meant a single value: zero. For UDS streams, however, this value would grow over time as new connections were established.
On systems with a high volume of connect churn, this can lead to a number of orphaned metrics where the task name is used as a tag, thus creating a unique metric... which in turn becomes a memory leak, and CPU hog as more and more metrics have to be processed, copied during map resizes, and so on.
While we'd like to solve the problem of orphaned metrics not being automatically cleaned up, we're making a tactical fix here since the unbounded cardinality being removed will solve our immediate problem of said memory leakage.
- [x] Bug fix
- [ ] New feature
- [ ] Non-functional (chore, refactoring, docs)
- [ ] Performance
- Manual local testing.
DADP-2
Co-authored-by: toby.lawrence <toby.lawrence@datadoghq.com>1 parent c2ff310 commit 7451d93
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
1081 | | - | |
1082 | 1081 | | |
1083 | 1082 | | |
1084 | 1083 | | |
| |||
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | | - | |
| 1110 | + | |
1112 | 1111 | | |
1113 | | - | |
1114 | 1112 | | |
1115 | | - | |
1116 | 1113 | | |
1117 | 1114 | | |
1118 | 1115 | | |
| |||
0 commit comments