@@ -402,27 +402,17 @@ func (suite *ecsSuite) TestCPU() {
402402 })
403403}
404404
405- func (suite * ecsSuite ) TestDogtstatsdUDS () {
406- suite .testDogstatsd ("dogstatsd-uds" )
407- }
408-
409- func (suite * ecsSuite ) TestDogtstatsdUDP () {
410- suite .testDogstatsd ("dogstatsd-udp" )
411- }
412-
413- func (suite * ecsSuite ) testDogstatsd (taskName string ) {
405+ func (suite * ecsSuite ) TestDogstatsd () {
406+ // Test dogstatsd origin detection with UDS
414407 suite .testMetric (& testMetricArgs {
415408 Filter : testMetricFilterArgs {
416409 Name : "custom.metric" ,
417- Tags : []string {
418- `^task_name:.*-` + taskName + `-ec2$` ,
419- },
420410 },
421411 Expect : testMetricExpectArgs {
422412 Tags : & []string {
423413 `^cluster_name:` + regexp .QuoteMeta (suite .ecsClusterName ) + `$` ,
424414 `^container_id:` ,
425- `^container_name:ecs-.*-` + taskName + ` -ec2-` ,
415+ `^container_name:ecs-.*-dogstatsd-uds -ec2-` ,
426416 `^docker_image:ghcr.io/datadog/apps-dogstatsd:main$` ,
427417 `^ecs_cluster_name:` + regexp .QuoteMeta (suite .ecsClusterName ) + `$` ,
428418 `^ecs_container_name:dogstatsd$` ,
@@ -434,8 +424,8 @@ func (suite *ecsSuite) testDogstatsd(taskName string) {
434424 `^series:` ,
435425 `^short_image:apps-dogstatsd$` ,
436426 `^task_arn:` ,
437- `^task_family:.*-` + taskName + ` -ec2$` ,
438- `^task_name:.*-` + taskName + ` -ec2$` ,
427+ `^task_family:.*-dogstatsd-uds -ec2$` ,
428+ `^task_name:.*-dogstatsd-uds -ec2$` ,
439429 `^task_version:[[:digit:]]+$` ,
440430 },
441431 },
0 commit comments