Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ exports_files(["go.mod"])
# gazelle:exclude pkg/ebpf/ebpftest/cgo_align.go
# gazelle:resolve go github.com/DataDog/datadog-agent/pkg/ebpf/ebpftest //pkg/ebpf/ebpftest
# gazelle:exclude internal/qbranch/anomalydetection-testbench
# gazelle:exclude tools/retry_file_dump
# gazelle:exclude vendor

# ======= TESTDATA EXCLUDES =======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ go_library(
importpath = "github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder/internal/retry",
visibility = [
"//comp/forwarder/defaultforwarder:__subpackages__",
"//tools/retry_file_dump:__pkg__",
"@com_github_datadog_datadog_agent_comp_forwarder_defaultforwarder//:__subpackages__",
],
deps = [
Expand Down
1 change: 0 additions & 1 deletion tools/retry_file_dump/.gitignore

This file was deleted.

19 changes: 19 additions & 0 deletions tools/retry_file_dump/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("@rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "retry_file_dump_lib",
srcs = ["main.go"],
importpath = "github.com/DataDog/datadog-agent/tools/retry_file_dump",
visibility = ["//visibility:private"],
deps = [
"//comp/forwarder/defaultforwarder/internal/retry",
"@org_golang_google_protobuf//proto",
],
)

go_binary(
name = "retry_file_dump",
embed = [":retry_file_dump_lib"],
# This should never be in the final product.
visibility = ["//visibility:private"],
)
11 changes: 2 additions & 9 deletions tools/retry_file_dump/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@ This tool dumps the transactions stored in a `.retry` file into a JSON file.

## Build

Copy the protobuf file:
```
cp ../../pkg/forwarder/internal/retry/HttpTransactionProto.pb.go .
```

In `HttpTransactionProto.pb.go` replace `package retry` to `package main`

Build with `go build`.
`bazel build //tools/retry_file_dump`.

## Usage

The following command creates a JSON file (`.retry.json`) for each `.retry` file in `/opt/datadog-agent/run/transactions_to_retry/c47da40ac935c8fd5ca1441a5ee3d068/`:
```
./retry_file_dump --folder=/opt/datadog-agent/run/transactions_to_retry/c47da40ac935c8fd5ca1441a5ee3d068/
bazel run //tools/retry_file_dump:retry_file_dump -- --folder=/opt/datadog-agent/run/transactions_to_retry/c47da40ac935c8fd5ca1441a5ee3d068/
```

The generated JSON files contain `\ufffdAPI_KEY\ufffd0\ufffd` which is a placeholder for the API key.
168 changes: 167 additions & 1 deletion tools/retry_file_dump/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,170 @@ module github.com/DataDog/datadog-agent/tools/retry_file_dump

go 1.26.0

require google.golang.org/protobuf v1.36.12-0.20260116114154-8c4c4ae446ca
require (
github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder v0.82.1
google.golang.org/protobuf v1.36.12-0.20260116114154-8c4c4ae446ca
)

require (
github.com/DataDog/datadog-agent/comp/core/config v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/configstreamconsumer/def v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/delegatedauth v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/flare/builder v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/flare/types v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/log/def v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/secrets/def v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/secrets/noop-impl v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/core/telemetry v0.82.1 // indirect
github.com/DataDog/datadog-agent/comp/def v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/basic v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/buildschema v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/create v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/env v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/helper v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/mock v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/model v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/setup v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/setup/constants v0.0.0-00010101000000-000000000000 // indirect
github.com/DataDog/datadog-agent/pkg/config/structure v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/config/utils v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/fips v0.83.0-devel.0.20260729075015-99ed037f1c29 // indirect
github.com/DataDog/datadog-agent/pkg/template v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/defaultpaths v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/executable v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/filesystem v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/fxutil v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/option v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/system v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/winutil v0.82.1 // indirect
github.com/DataDog/datadog-agent/pkg/version v0.82.1 // indirect
github.com/DataDog/go-acl v1.0.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/ebitengine/purego v0.10.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/gofrs/flock v0.13.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lufia/plan9stats v0.0.0-20260330125221-c963978e514e // indirect
github.com/mdlayher/socket v0.6.0 // indirect
github.com/mdlayher/vsock v1.3.0 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/prometheus/client_golang v1.24.1 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.70.1 // indirect
github.com/prometheus/procfs v0.21.1 // indirect
github.com/shirou/gopsutil/v4 v4.26.7 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/cobra v1.10.2 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/dig v1.19.0 // indirect
go.uber.org/fx v1.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/net v0.57.0 // indirect
golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.40.0 // indirect
golang.org/x/time v0.15.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/DataDog/datadog-agent/comp/core/config => ../../comp/core/config

replace github.com/DataDog/datadog-agent/comp/core/configstreamconsumer/def => ../../comp/core/configstreamconsumer/def

replace github.com/DataDog/datadog-agent/comp/core/delegatedauth => ../../comp/core/delegatedauth

replace github.com/DataDog/datadog-agent/comp/core/flare/builder => ../../comp/core/flare/builder

replace github.com/DataDog/datadog-agent/comp/core/flare/types => ../../comp/core/flare/types

replace github.com/DataDog/datadog-agent/comp/core/log/def => ../../comp/core/log/def

replace github.com/DataDog/datadog-agent/comp/core/log/mock => ../../comp/core/log/mock

replace github.com/DataDog/datadog-agent/comp/core/secrets/def => ../../comp/core/secrets/def

replace github.com/DataDog/datadog-agent/comp/core/secrets/mock => ../../comp/core/secrets/mock

replace github.com/DataDog/datadog-agent/comp/core/secrets/noop-impl => ../../comp/core/secrets/noop-impl

replace github.com/DataDog/datadog-agent/comp/core/secrets/utils => ../../comp/core/secrets/utils

replace github.com/DataDog/datadog-agent/comp/core/telemetry => ../../comp/core/telemetry

replace github.com/DataDog/datadog-agent/comp/def => ../../comp/def

replace github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder => ../../comp/forwarder/defaultforwarder

replace github.com/DataDog/datadog-agent/pkg/collector/check/defaults => ../../pkg/collector/check/defaults

replace github.com/DataDog/datadog-agent/pkg/config/basic => ../../pkg/config/basic

replace github.com/DataDog/datadog-agent/pkg/config/buildschema => ../../pkg/config/buildschema

replace github.com/DataDog/datadog-agent/pkg/config/create => ../../pkg/config/create

replace github.com/DataDog/datadog-agent/pkg/config/env => ../../pkg/config/env

replace github.com/DataDog/datadog-agent/pkg/config/helper => ../../pkg/config/helper

replace github.com/DataDog/datadog-agent/pkg/config/mock => ../../pkg/config/mock

replace github.com/DataDog/datadog-agent/pkg/config/model => ../../pkg/config/model

replace github.com/DataDog/datadog-agent/pkg/config/nodetreemodel => ../../pkg/config/nodetreemodel

replace github.com/DataDog/datadog-agent/pkg/config/setup => ../../pkg/config/setup

replace github.com/DataDog/datadog-agent/pkg/config/setup/constants => ../../pkg/config/setup/constants

replace github.com/DataDog/datadog-agent/pkg/config/structure => ../../pkg/config/structure

replace github.com/DataDog/datadog-agent/pkg/config/utils => ../../pkg/config/utils

replace github.com/DataDog/datadog-agent/pkg/fips => ../../pkg/fips

replace github.com/DataDog/datadog-agent/pkg/template => ../../pkg/template

replace github.com/DataDog/datadog-agent/pkg/util/defaultpaths => ../../pkg/util/defaultpaths

replace github.com/DataDog/datadog-agent/pkg/util/executable => ../../pkg/util/executable

replace github.com/DataDog/datadog-agent/pkg/util/filesystem => ../../pkg/util/filesystem

replace github.com/DataDog/datadog-agent/pkg/util/fxutil => ../../pkg/util/fxutil

replace github.com/DataDog/datadog-agent/pkg/util/log => ../../pkg/util/log

replace github.com/DataDog/datadog-agent/pkg/util/option => ../../pkg/util/option

replace github.com/DataDog/datadog-agent/pkg/util/pointer => ../../pkg/util/pointer

replace github.com/DataDog/datadog-agent/pkg/util/scrubber => ../../pkg/util/scrubber

replace github.com/DataDog/datadog-agent/pkg/util/system => ../../pkg/util/system

replace github.com/DataDog/datadog-agent/pkg/util/testutil => ../../pkg/util/testutil

replace github.com/DataDog/datadog-agent/pkg/util/winutil => ../../pkg/util/winutil

replace github.com/DataDog/datadog-agent/pkg/version => ../../pkg/version
Loading
Loading