-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport 7.64.x] [CNM] incident-35509 fixes for failed TCP telemetry (…
…#34445) Co-authored-by: Hasan Mahmood <[email protected]>
- Loading branch information
1 parent
ff62275
commit 27e7f82
Showing
2 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2025-present Datadog, Inc. | ||
|
||
//go:build linux_bpf | ||
|
||
// Package connection provides tracing for connections | ||
package connection | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/DataDog/datadog-agent/pkg/ebpf/maps" | ||
"github.com/DataDog/datadog-agent/pkg/network/config" | ||
"github.com/DataDog/datadog-agent/pkg/network/ebpf/probes" | ||
) | ||
|
||
func TestFailedConnectionTelemetryMapLoads(t *testing.T) { | ||
tr, err := newEbpfTracer(config.New(), nil) | ||
require.NoError(t, err, "could not load tracer") | ||
t.Cleanup(tr.Stop) | ||
|
||
_, err = maps.GetMap[int32, uint64](tr.(*ebpfTracer).m.Manager, probes.TCPFailureTelemetry) | ||
require.NoError(t, err, "error loading tcp failure telemetry map") | ||
} |