Skip to content

Commit e8687b3

Browse files
authored
fix(dogstatsd): change stream handler task name to avoid unbounded cardinality (backport #1899 to 1.2.x) (#1902)
## Summary Backport of #1899 to the `releases/1.2.x` line. ## Backport notes Our cherry pick of `aeda7d87a1bd7acc0f00e35d993862dc45c1a32d` didn't apply cleanly itself but the diff we have here is identical to the diff in the original PR. ## Change Type - [x] Bug fix - [ ] New feature - [ ] Non-functional (chore, refactoring, docs) - [ ] Performance ## How did you test this PR? - Manual local testing (original PR). - `cargo check -p saluki-components` on the backport branch. ## References DADP-2 Co-authored-by: toby.lawrence <toby.lawrence@datadoghq.com>
1 parent c2ff310 commit e8687b3

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • lib/saluki-components/src/sources/dogstatsd

lib/saluki-components/src/sources/dogstatsd/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,6 @@ async fn process_listener(
10781078
}
10791079

10801080
let mut stream_shutdown_coordinator = DynamicShutdownCoordinator::default();
1081-
let mut stream_idx: u32 = 0;
10821081

10831082
info!(%listen_addr, "DogStatsD listener started.");
10841083

@@ -1108,11 +1107,9 @@ async fn process_listener(
11081107
};
11091108

11101109
let task_name = format!(
1111-
"dogstatsd-stream-handler-{}-{}",
1110+
"dogstatsd-stream-handler-{}",
11121111
listen_addr.listener_type(),
1113-
stream_idx,
11141112
);
1115-
stream_idx = stream_idx.wrapping_add(1);
11161113
spawn_traced_named(task_name, process_stream(stream, source_context.clone(), handler_context, stream_shutdown_coordinator.register(), enabled_filter));
11171114
}
11181115
Err(e) => {

0 commit comments

Comments
 (0)