diff --git a/.github/workflows/betterstack-docker.yml b/.github/workflows/betterstack-docker.yml index f81ea778f..7ea478c3b 100644 --- a/.github/workflows/betterstack-docker.yml +++ b/.github/workflows/betterstack-docker.yml @@ -32,19 +32,33 @@ jobs: with: go-version-file: go.mod - - name: Apply memory leak fix + - name: Verify memory spike fixes are present run: | - echo "Applying BetterStack memory leak fix..." - patch -p1 < fix-memory-leak-minimal.patch + echo "Verifying our memory spike fixes are in the source code..." + if ! grep -q "BEYLA_MAX_CONCURRENT_ELF" vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go; then + echo "❌ FAIL: BEYLA_MAX_CONCURRENT_ELF not found in typer.go" + echo "This means our memory spike fixes are missing from the source!" + exit 1 + fi + if ! grep -q "elfParseSem" vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go; then + echo "❌ FAIL: elfParseSem variable not found in typer.go" + echo "This means our semaphore code is missing!" + exit 1 + fi + if ! grep -q "Acquire semaphore to limit concurrent ELF parsing" vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go; then + echo "❌ FAIL: Semaphore comment not found in typer.go" + echo "This means our semaphore implementation is missing!" + exit 1 + fi + echo "✅ SUCCESS: All memory spike fix markers found in source code" + echo "✅ BEYLA_MAX_CONCURRENT_ELF environment variable: FOUND" + echo "✅ elfParseSem semaphore variable: FOUND" + echo "✅ Semaphore implementation: FOUND" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Depot + uses: depot/setup-action@v1 - name: Log in to DockerHub - if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -60,29 +74,36 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} # For version tags, use the version type=ref,event=tag - # For branches, use branch name + # For pull requests, use pr-X format + type=ref,event=pr,prefix=pr- + # For branches, use branch name (sanitized) type=ref,event=branch - # SHA prefix for all builds - type=sha,prefix={{branch}}-,format=short + # SHA prefix - use pr-X for PRs, branch for others + type=sha,prefix=pr-{{pr}}-,format=short,enable=${{ github.event_name == 'pull_request' }} + type=sha,prefix={{branch}}-,format=short,enable=${{ github.event_name != 'pull_request' }} - name: Build and test run: | - make build + # Everything is already vendored and committed, just compile + make compile + # Install test prerequisites + make prereqs make test - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: depot/build-push-action@v1 with: + project: ${{ secrets.DEPOT_PROJECT_ID }} + token: ${{ secrets.DEPOT_API_TOKEN }} context: . platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max build-args: | VERSION=${{ github.ref_name }} COMMIT=${{ github.sha }} + DEV_OBI=1 - name: Update Docker Hub description if: github.event_name == 'push' && github.ref == 'refs/heads/main' diff --git a/Dockerfile b/Dockerfile index 56faba925..f1067e167 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,10 +36,23 @@ COPY third_party_licenses.csv third_party_licenses.csv ENV TOOLS_DIR=/go/bin # Build +RUN echo "=== Verifying patches before build ===" && \ + grep -q "BEYLA_MAX_CONCURRENT_ELF" vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go && \ + echo "✅ Patches present before build steps" || (echo "❌ Patches missing before build steps" && exit 1) + RUN if [ -z "${DEV_OBI}" ]; then \ make generate && \ make copy-obi-vendor \ ; fi + +RUN echo "=== Verifying patches after generate/vendor steps ===" && \ + grep -q "BEYLA_MAX_CONCURRENT_ELF" vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go && \ + echo "✅ Patches still present after generate/vendor steps" || (echo "❌ Patches overwritten by generate/vendor steps" && exit 1) + +RUN echo "=== FINAL VERIFICATION: Verifying patches immediately before compilation ===" && \ + grep -q "BEYLA_MAX_CONCURRENT_ELF" vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go && \ + echo "✅ CONFIRMED: Patches present, proceeding with compilation" || (echo "❌ CRITICAL: Patches missing before compilation!" && exit 1) + RUN make compile # Create final image from minimal + built binary diff --git a/Makefile b/Makefile index aa6801d48..4665565e6 100644 --- a/Makefile +++ b/Makefile @@ -197,15 +197,33 @@ copy-obi-vendor: go get go.opentelemetry.io/obi go mod vendor +.PHONY: copy-generated-files-only +copy-generated-files-only: + @echo "### Copying generated files without overwriting vendor patches..." + @if [ -d ".obi-src" ]; then \ + cp -f .obi-src/pkg/internal/otelsdk/grafana-opentelemetry-java.jar vendor/go.opentelemetry.io/obi/pkg/internal/otelsdk/ 2>/dev/null || true; \ + find .obi-src -name "*bpfel.go" -exec cp {} vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/ \; 2>/dev/null || true; \ + find .obi-src -name "*bpfeb.go" -exec cp {} vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/ \; 2>/dev/null || true; \ + echo "Generated files copied successfully"; \ + else \ + echo "No .obi-src directory found, skipping generated file copy"; \ + fi + .PHONY: vendor-obi vendor-obi: obi-submodule docker-generate copy-obi-vendor +.PHONY: vendor-obi-preserve-patches +vendor-obi-preserve-patches: obi-submodule docker-generate copy-generated-files-only + .PHONY: verify verify: prereqs lint-dashboard vendor-obi lint test .PHONY: build build: vendor-obi verify compile +.PHONY: build-preserve-patches +build-preserve-patches: vendor-obi-preserve-patches compile + .PHONY: all all: vendor-obi build diff --git a/fix-memory-spikes-test.patch b/fix-memory-spikes-test.patch new file mode 100644 index 000000000..d498af520 --- /dev/null +++ b/fix-memory-spikes-test.patch @@ -0,0 +1,128 @@ +diff --git a/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer_test.go b/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer_test.go +new file mode 100644 +index 0000000..1234567 +--- /dev/null ++++ b/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer_test.go +@@ -0,0 +1,120 @@ ++package discover ++ ++import ( ++ "sync" ++ "sync/atomic" ++ "testing" ++ "time" ++ ++ lru "github.com/hashicorp/golang-lru/v2" ++ "github.com/stretchr/testify/assert" ++ "github.com/stretchr/testify/require" ++ ++ "go.opentelemetry.io/obi/pkg/components/exec" ++ "go.opentelemetry.io/obi/pkg/components/svc" ++ "go.opentelemetry.io/obi/pkg/internal/goexec" ++) ++ ++// TestConcurrentELFParsing verifies that the semaphore correctly limits ++// concurrent ELF parsing operations ++func TestConcurrentELFParsing(t *testing.T) { ++ // Save original semaphore and restore after test ++ originalSem := elfParseSem ++ defer func() { elfParseSem = originalSem }() ++ ++ // Create a semaphore with limit of 2 ++ elfParseSem = make(chan struct{}, 2) ++ ++ // Create test typer with empty cache ++ cache, _ := lru.New[uint64, InstrumentedExecutable](10) ++ typer := &typer{ ++ instrumentableCache: cache, ++ } ++ ++ // Mock inspectOffsets to simulate slow ELF parsing ++ var activeParsers int32 ++ var maxActiveParsers int32 ++ ++ typer.inspectOffsets = func(execElf *exec.FileInfo) (*goexec.Offsets, bool, error) { ++ // Increment active parsers counter ++ current := atomic.AddInt32(&activeParsers, 1) ++ ++ // Track maximum concurrent parsers ++ for { ++ max := atomic.LoadInt32(&maxActiveParsers) ++ if current <= max || atomic.CompareAndSwapInt32(&maxActiveParsers, max, current) { ++ break ++ } ++ } ++ ++ // Simulate parsing work ++ time.Sleep(50 * time.Millisecond) ++ ++ // Decrement active parsers ++ atomic.AddInt32(&activeParsers, -1) ++ ++ return &goexec.Offsets{}, true, nil ++ } ++ ++ // Launch 5 concurrent parsing attempts ++ var wg sync.WaitGroup ++ for i := 0; i < 5; i++ { ++ wg.Add(1) ++ go func(pid int32) { ++ defer wg.Done() ++ ++ execElf := &exec.FileInfo{ ++ Pid: pid, ++ CmdExePath: "/test/binary", ++ Ino: uint64(pid), // Different inode for each to avoid cache ++ } ++ ++ _ = typer.asInstrumentable(execElf) ++ }(int32(i)) ++ } ++ ++ wg.Wait() ++ ++ // Verify that no more than 2 parsers ran concurrently ++ assert.LessOrEqual(t, maxActiveParsers, int32(2), ++ "Expected at most 2 concurrent parsers, but had %d", maxActiveParsers) ++} ++ ++// TestCacheHitAvoidsParsing verifies that cache hits skip ELF parsing entirely ++func TestCacheHitAvoidsParsing(t *testing.T) { ++ cache, _ := lru.New[uint64, InstrumentedExecutable](10) ++ ++ // Pre-populate cache ++ cached := InstrumentedExecutable{ ++ Type: svc.InstrumentableGolang, ++ Offsets: &goexec.Offsets{}, ++ } ++ cache.Add(uint64(123), cached) ++ ++ typer := &typer{ ++ instrumentableCache: cache, ++ } ++ ++ parseCount := 0 ++ typer.inspectOffsets = func(execElf *exec.FileInfo) (*goexec.Offsets, bool, error) { ++ parseCount++ ++ return nil, false, nil ++ } ++ ++ // First request - should hit cache ++ execElf1 := &exec.FileInfo{ ++ Pid: 1, ++ Ino: 123, ++ } ++ result1 := typer.asInstrumentable(execElf1) ++ ++ // Second request with same inode - should also hit cache ++ execElf2 := &exec.FileInfo{ ++ Pid: 2, ++ Ino: 123, ++ } ++ result2 := typer.asInstrumentable(execElf2) ++ ++ // Verify no parsing occurred ++ assert.Equal(t, 0, parseCount, "Expected no parsing for cached entries") ++ assert.Equal(t, svc.InstrumentableGolang, result1.Type) ++ assert.Equal(t, svc.InstrumentableGolang, result2.Type) ++} \ No newline at end of file diff --git a/fix-memory-spikes.patch b/fix-memory-spikes.patch new file mode 100644 index 000000000..48053300f --- /dev/null +++ b/fix-memory-spikes.patch @@ -0,0 +1,78 @@ +diff --git a/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go b/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go +index original..modified 100644 +--- a/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go ++++ b/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go +@@ -8,6 +8,8 @@ import ( + "errors" + "fmt" + "log/slog" ++ "os" ++ "strconv" + "strings" + + lru "github.com/hashicorp/golang-lru/v2" +@@ -27,6 +29,21 @@ import ( + "go.opentelemetry.io/obi/pkg/services" + ) + ++var ( ++ // elfParseSem limits concurrent ELF symbol parsing to prevent memory spikes ++ // when multiple processes of the same binary start simultaneously ++ elfParseSem chan struct{} ++) ++ ++func init() { ++ maxConcurrent := 2 ++ if val := os.Getenv("BEYLA_MAX_CONCURRENT_ELF"); val != "" { ++ if n, err := strconv.Atoi(val); err == nil && n > 0 { ++ maxConcurrent = n ++ } ++ } ++ elfParseSem = make(chan struct{}, maxConcurrent) ++} ++ + type InstrumentedExecutable struct { + Type svc.InstrumentableType + Offsets *goexec.Offsets +@@ -180,11 +197,40 @@ func (t *typer) FilterClassify(evs []Event[ProcessMatch]) []Event[ebpf.Instrumen + // in case of belonging to a forked process, returns its parent. + func (t *typer) asInstrumentable(execElf *exec.FileInfo) ebpf.Instrumentable { + log := t.log.With("pid", execElf.Pid, "comm", execElf.CmdExePath) ++ ++ // Check cache first to avoid expensive ELF symbol parsing + if ic, ok := t.instrumentableCache.Get(execElf.Ino); ok { + log.Debug("new instance of existing executable", "type", ic.Type) + return ebpf.Instrumentable{Type: ic.Type, FileInfo: execElf, Offsets: ic.Offsets, InstrumentationError: ic.InstrumentationError} + } + ++ // Acquire semaphore to limit concurrent ELF parsing ++ // This prevents memory spikes when multiple processes start simultaneously ++ select { ++ case elfParseSem <- struct{}{}: ++ // Got a token, proceed ++ log.Debug("acquired ELF parse semaphore") ++ default: ++ // Semaphore is full, log and wait ++ log.Debug("waiting for ELF parse semaphore", ++ "queue_length", len(elfParseSem), ++ "max_concurrent", cap(elfParseSem)) ++ elfParseSem <- struct{}{} // This will block ++ log.Debug("acquired ELF parse semaphore after waiting") ++ } ++ ++ // Always release the semaphore when done ++ defer func() { ++ <-elfParseSem ++ log.Debug("released ELF parse semaphore") ++ }() ++ ++ // Double-check cache after acquiring semaphore ++ // Another goroutine may have populated it while we waited ++ if ic, ok := t.instrumentableCache.Get(execElf.Ino); ok { ++ log.Debug("cache hit after semaphore acquisition", "type", ic.Type) ++ return ebpf.Instrumentable{Type: ic.Type, FileInfo: execElf, Offsets: ic.Offsets, InstrumentationError: ic.InstrumentationError} ++ } ++ + log.Debug("getting instrumentable information") + // look for suitable Go application first + offsets, ok, err := t.inspectOffsets(execElf) \ No newline at end of file diff --git a/go.mod b/go.mod index cee9b102c..2367532ec 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( go.opentelemetry.io/collector/exporter/otlpexporter v0.136.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.136.0 go.opentelemetry.io/collector/pdata v1.42.0 - go.opentelemetry.io/obi v0.0.0-20251013143511-10fd81bc8389 + go.opentelemetry.io/obi v0.0.0-20251023073643-d71d07a6a4d2 go.opentelemetry.io/otel v1.38.0 go.opentelemetry.io/otel/sdk v1.38.0 go.opentelemetry.io/otel/sdk/metric v1.38.0 diff --git a/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go b/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go index 8db7049ca..5cecd0bb6 100644 --- a/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go +++ b/vendor/go.opentelemetry.io/obi/pkg/components/discover/typer.go @@ -8,6 +8,8 @@ import ( "errors" "fmt" "log/slog" + "os" + "strconv" "strings" lru "github.com/hashicorp/golang-lru/v2" @@ -27,6 +29,22 @@ import ( "go.opentelemetry.io/obi/pkg/services" ) +var ( + // elfParseSem limits concurrent ELF symbol parsing to prevent memory spikes + // when multiple processes of the same binary start simultaneously + elfParseSem chan struct{} +) + +func init() { + maxConcurrent := 2 + if val := os.Getenv("BEYLA_MAX_CONCURRENT_ELF"); val != "" { + if n, err := strconv.Atoi(val); err == nil && n > 0 { + maxConcurrent = n + } + } + elfParseSem = make(chan struct{}, maxConcurrent) +} + type InstrumentedExecutable struct { Type svc.InstrumentableType Offsets *goexec.Offsets @@ -180,11 +198,46 @@ func (t *typer) FilterClassify(evs []Event[ProcessMatch]) []Event[ebpf.Instrumen // in case of belonging to a forked process, returns its parent. func (t *typer) asInstrumentable(execElf *exec.FileInfo) ebpf.Instrumentable { log := t.log.With("pid", execElf.Pid, "comm", execElf.CmdExePath) + + // Check cache first to avoid expensive ELF symbol parsing if ic, ok := t.instrumentableCache.Get(execElf.Ino); ok { log.Debug("new instance of existing executable", "type", ic.Type) return ebpf.Instrumentable{Type: ic.Type, FileInfo: execElf, Offsets: ic.Offsets, InstrumentationError: ic.InstrumentationError} } + // Acquire semaphore to limit concurrent ELF parsing + // This prevents memory spikes when multiple processes start simultaneously + select { + case elfParseSem <- struct{}{}: + // Got a token, proceed + log.Debug("acquired ELF parse semaphore") + default: + // Semaphore is full, log and wait + log.Debug("waiting for ELF parse semaphore", + "queue_length", len(elfParseSem), + "max_concurrent", cap(elfParseSem)) + elfParseSem <- struct{}{} // This will block + log.Debug("acquired ELF parse semaphore after waiting") + } + + // Always release the semaphore when done, even on panic + defer func() { + if r := recover(); r != nil { + <-elfParseSem + log.Debug("released ELF parse semaphore after panic") + panic(r) // Re-panic after cleanup + } + <-elfParseSem + log.Debug("released ELF parse semaphore") + }() + + // Double-check cache after acquiring semaphore + // Another goroutine may have populated it while we waited + if ic, ok := t.instrumentableCache.Get(execElf.Ino); ok { + log.Debug("cache hit after semaphore acquisition", "type", ic.Type) + return ebpf.Instrumentable{Type: ic.Type, FileInfo: execElf, Offsets: ic.Offsets, InstrumentationError: ic.InstrumentationError} + } + log.Debug("getting instrumentable information") // look for suitable Go application first offsets, ok, err := t.inspectOffsets(execElf) diff --git a/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_arm64_bpfel.go new file mode 100644 index 000000000..826850c34 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_arm64_bpfel.go @@ -0,0 +1,492 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package ebpfcommon + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfHttpRequestTraceT struct { + _ structs.HostLayout + Type uint8 + Pad0 [1]uint8 + Status uint16 + Method [7]uint8 + Scheme [10]uint8 + Pad1 [11]uint8 + GoStartMonotimeNs uint64 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ContentLength int64 + ResponseLength int64 + Path [100]uint8 + Host [100]uint8 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Conn BpfConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfConnectionInfoT + Pad1 [4]uint8 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfConnectionInfoT + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + PrevTp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfConnectionInfoT + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfSqlRequestTraceT struct { + _ structs.HostLayout + Type uint8 + Pad [1]uint8 + Status uint16 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Conn BpfConnectionInfoT + Sql [500]uint8 +} + +type BpfTcpLargeBufferT struct { + _ structs.HostLayout + Type uint8 + PacketType uint8 + Action uint8 + Direction uint8 + Len uint32 + ConnInfo BpfConnectionInfoT + Pad2 uint32 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Buf [0]uint8 +} + +type BpfTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType uint8 + Pad1 [3]uint8 + ConnInfo BpfConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + Unused10 *ebpf.VariableSpec `ebpf:"unused_10"` + Unused11 *ebpf.VariableSpec `ebpf:"unused_11"` + Unused3 *ebpf.VariableSpec `ebpf:"unused_3"` + Unused4 *ebpf.VariableSpec `ebpf:"unused_4"` + Unused5 *ebpf.VariableSpec `ebpf:"unused_5"` + Unused6 *ebpf.VariableSpec `ebpf:"unused_6"` + Unused7 *ebpf.VariableSpec `ebpf:"unused_7"` + Unused8 *ebpf.VariableSpec `ebpf:"unused_8"` + Unused9 *ebpf.VariableSpec `ebpf:"unused_9"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { +} + +func (m *BpfMaps) Close() error { + return _BpfClose() +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + Unused10 *ebpf.Variable `ebpf:"unused_10"` + Unused11 *ebpf.Variable `ebpf:"unused_11"` + Unused3 *ebpf.Variable `ebpf:"unused_3"` + Unused4 *ebpf.Variable `ebpf:"unused_4"` + Unused5 *ebpf.Variable `ebpf:"unused_5"` + Unused6 *ebpf.Variable `ebpf:"unused_6"` + Unused7 *ebpf.Variable `ebpf:"unused_7"` + Unused8 *ebpf.Variable `ebpf:"unused_8"` + Unused9 *ebpf.Variable `ebpf:"unused_9"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { +} + +func (p *BpfPrograms) Close() error { + return _BpfClose() +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_arm64_bpfel.o new file mode 100644 index 000000000..bc1cd3e77 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_x86_bpfel.go new file mode 100644 index 000000000..1c2f887d5 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_x86_bpfel.go @@ -0,0 +1,492 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package ebpfcommon + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfHttpRequestTraceT struct { + _ structs.HostLayout + Type uint8 + Pad0 [1]uint8 + Status uint16 + Method [7]uint8 + Scheme [10]uint8 + Pad1 [11]uint8 + GoStartMonotimeNs uint64 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ContentLength int64 + ResponseLength int64 + Path [100]uint8 + Host [100]uint8 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Conn BpfConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfConnectionInfoT + Pad1 [4]uint8 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfConnectionInfoT + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + PrevTp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfConnectionInfoT + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfSqlRequestTraceT struct { + _ structs.HostLayout + Type uint8 + Pad [1]uint8 + Status uint16 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Conn BpfConnectionInfoT + Sql [500]uint8 +} + +type BpfTcpLargeBufferT struct { + _ structs.HostLayout + Type uint8 + PacketType uint8 + Action uint8 + Direction uint8 + Len uint32 + ConnInfo BpfConnectionInfoT + Pad2 uint32 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Buf [0]uint8 +} + +type BpfTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType uint8 + Pad1 [3]uint8 + ConnInfo BpfConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + Unused10 *ebpf.VariableSpec `ebpf:"unused_10"` + Unused11 *ebpf.VariableSpec `ebpf:"unused_11"` + Unused3 *ebpf.VariableSpec `ebpf:"unused_3"` + Unused4 *ebpf.VariableSpec `ebpf:"unused_4"` + Unused5 *ebpf.VariableSpec `ebpf:"unused_5"` + Unused6 *ebpf.VariableSpec `ebpf:"unused_6"` + Unused7 *ebpf.VariableSpec `ebpf:"unused_7"` + Unused8 *ebpf.VariableSpec `ebpf:"unused_8"` + Unused9 *ebpf.VariableSpec `ebpf:"unused_9"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { +} + +func (m *BpfMaps) Close() error { + return _BpfClose() +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + Unused10 *ebpf.Variable `ebpf:"unused_10"` + Unused11 *ebpf.Variable `ebpf:"unused_11"` + Unused3 *ebpf.Variable `ebpf:"unused_3"` + Unused4 *ebpf.Variable `ebpf:"unused_4"` + Unused5 *ebpf.Variable `ebpf:"unused_5"` + Unused6 *ebpf.Variable `ebpf:"unused_6"` + Unused7 *ebpf.Variable `ebpf:"unused_7"` + Unused8 *ebpf.Variable `ebpf:"unused_8"` + Unused9 *ebpf.Variable `ebpf:"unused_9"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { +} + +func (p *BpfPrograms) Close() error { + return _BpfClose() +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_x86_bpfel.o new file mode 100644 index 000000000..bc1cd3e77 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/ebpf/common/bpf_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_arm64_bpfel.go new file mode 100644 index 000000000..0b4633f96 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_arm64_bpfel.go @@ -0,0 +1,799 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfPidConnectionInfoT + ProtocolType BpfProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfFdInfoT struct { + _ structs.HostLayout + Pid BpfPidKeyT + Fd int32 + Type uint32 +} + +type BpfFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfCallProtocolArgsT + Stream BpfHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfPidConnectionInfoT + StreamId uint32 +} + +type BpfHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Pid uint32 +} + +type BpfPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfProtocolType uint8 + +const ( + BpfProtocolTypeK_protocolTypeUnknown BpfProtocolType = 0 + BpfProtocolTypeK_protocolTypeMysql BpfProtocolType = 1 + BpfProtocolTypeK_protocolTypePostgres BpfProtocolType = 2 +) + +type BpfRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfSendArgsT struct { + _ structs.HostLayout + P_conn BpfPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfProtocolType + Pad1 [3]uint8 + ConnInfo BpfConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfPidKeyT + Pad [4]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_arm64_bpfel.o new file mode 100644 index 000000000..ec7d4789e Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel-7e2b5d0f.o.tmp b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel-7e2b5d0f.o.tmp new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel.go new file mode 100644 index 000000000..d0be82181 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel.go @@ -0,0 +1,799 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfPidConnectionInfoT + ProtocolType BpfProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfFdInfoT struct { + _ structs.HostLayout + Pid BpfPidKeyT + Fd int32 + Type uint32 +} + +type BpfFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfCallProtocolArgsT + Stream BpfHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfPidConnectionInfoT + StreamId uint32 +} + +type BpfHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Pid uint32 +} + +type BpfPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfProtocolType uint8 + +const ( + BpfProtocolTypeK_protocolTypeUnknown BpfProtocolType = 0 + BpfProtocolTypeK_protocolTypeMysql BpfProtocolType = 1 + BpfProtocolTypeK_protocolTypePostgres BpfProtocolType = 2 +) + +type BpfRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfSendArgsT struct { + _ structs.HostLayout + P_conn BpfPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfProtocolType + Pad1 [3]uint8 + ConnInfo BpfConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfPidKeyT + Pad [4]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel.o new file mode 100644 index 000000000..dcfb89e66 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpf_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_arm64_bpfel.go new file mode 100644 index 000000000..a85f0ef36 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_arm64_bpfel.go @@ -0,0 +1,802 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfDebugPidConnectionInfoT + ProtocolType BpfDebugProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfDebugConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugCpSupportDataT struct { + _ structs.HostLayout + T_key BpfDebugTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugFdInfoT struct { + _ structs.HostLayout + Pid BpfDebugPidKeyT + Fd int32 + Type uint32 +} + +type BpfDebugFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfDebugGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfDebugHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfDebugCallProtocolArgsT + Stream BpfDebugHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfDebugHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfDebugHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfDebugPidConnectionInfoT + StreamId uint32 +} + +type BpfDebugHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfDebugHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfDebugHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfDebugMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfDebugMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfDebugPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Pid uint32 +} + +type BpfDebugPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfDebugProtocolType uint8 + +const ( + BpfDebugProtocolTypeK_protocolTypeUnknown BpfDebugProtocolType = 0 + BpfDebugProtocolTypeK_protocolTypeMysql BpfDebugProtocolType = 1 + BpfDebugProtocolTypeK_protocolTypePostgres BpfDebugProtocolType = 2 +) + +type BpfDebugRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfDebugSendArgsT struct { + _ structs.HostLayout + P_conn BpfDebugPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfDebugSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfDebugSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfDebugSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfDebugSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfDebugSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfDebugPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfDebugTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfDebugProtocolType + Pad1 [3]uint8 + ConnInfo BpfDebugConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfDebugPidKeyT + Pad [4]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.DebugEvents, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_arm64_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_arm64_bpfel.o new file mode 100644 index 000000000..ca60f6553 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_x86_bpfel.go new file mode 100644 index 000000000..5e5915ef3 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_x86_bpfel.go @@ -0,0 +1,802 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfDebugPidConnectionInfoT + ProtocolType BpfDebugProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfDebugConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugCpSupportDataT struct { + _ structs.HostLayout + T_key BpfDebugTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugFdInfoT struct { + _ structs.HostLayout + Pid BpfDebugPidKeyT + Fd int32 + Type uint32 +} + +type BpfDebugFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfDebugGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfDebugHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfDebugCallProtocolArgsT + Stream BpfDebugHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfDebugHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfDebugHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfDebugPidConnectionInfoT + StreamId uint32 +} + +type BpfDebugHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfDebugHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfDebugHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfDebugMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfDebugMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfDebugPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Pid uint32 +} + +type BpfDebugPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfDebugProtocolType uint8 + +const ( + BpfDebugProtocolTypeK_protocolTypeUnknown BpfDebugProtocolType = 0 + BpfDebugProtocolTypeK_protocolTypeMysql BpfDebugProtocolType = 1 + BpfDebugProtocolTypeK_protocolTypePostgres BpfDebugProtocolType = 2 +) + +type BpfDebugRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfDebugSendArgsT struct { + _ structs.HostLayout + P_conn BpfDebugPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfDebugSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfDebugSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfDebugSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfDebugSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfDebugSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfDebugPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfDebugTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfDebugProtocolType + Pad1 [3]uint8 + ConnInfo BpfDebugConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfDebugPidKeyT + Pad [4]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.DebugEvents, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_x86_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_x86_bpfel.o new file mode 100644 index 000000000..51124c4eb Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpfdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_arm64_bpfel.go new file mode 100644 index 000000000..a64c0834e --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_arm64_bpfel.go @@ -0,0 +1,799 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfTPPidConnectionInfoT + ProtocolType BpfTPProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfTPConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfTPConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTPTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfTPEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPFdInfoT struct { + _ structs.HostLayout + Pid BpfTPPidKeyT + Fd int32 + Type uint32 +} + +type BpfTPFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfTPGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfTPHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfTPCallProtocolArgsT + Stream BpfTPHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfTPHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfTPPidConnectionInfoT + StreamId uint32 +} + +type BpfTPHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfTPConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfTPHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfTPConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfTPMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfTPMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfTPPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfTPPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Pid uint32 +} + +type BpfTPPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfTPProtocolType uint8 + +const ( + BpfTPProtocolTypeK_protocolTypeUnknown BpfTPProtocolType = 0 + BpfTPProtocolTypeK_protocolTypeMysql BpfTPProtocolType = 1 + BpfTPProtocolTypeK_protocolTypePostgres BpfTPProtocolType = 2 +) + +type BpfTPRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfTPSendArgsT struct { + _ structs.HostLayout + P_conn BpfTPPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfTPSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfTPSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfTPSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfTPSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfTPPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfTPProtocolType + Pad1 [3]uint8 + ConnInfo BpfTPConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfTPPidKeyT + Pad [4]uint8 +} + +type BpfTPTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Type uint32 +} + +// LoadBpfTP returns the embedded CollectionSpec for BpfTP. +func LoadBpfTP() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTP: %w", err) + } + + return spec, err +} + +// LoadBpfTPObjects loads BpfTP and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPObjects +// *BpfTPPrograms +// *BpfTPMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTP() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPSpecs struct { + BpfTPProgramSpecs + BpfTPMapSpecs + BpfTPVariableSpecs +} + +// BpfTPProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfTPMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfTPVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPObjects struct { + BpfTPPrograms + BpfTPMaps + BpfTPVariables +} + +func (o *BpfTPObjects) Close() error { + return _BpfTPClose( + &o.BpfTPPrograms, + &o.BpfTPMaps, + ) +} + +// BpfTPMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfTPMaps) Close() error { + return _BpfTPClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfTPVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfTPPrograms) Close() error { + return _BpfTPClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfTPClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftp_arm64_bpfel.o +var _BpfTPBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_arm64_bpfel.o new file mode 100644 index 000000000..ab909f77a Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_x86_bpfel.go new file mode 100644 index 000000000..65f1bf769 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_x86_bpfel.go @@ -0,0 +1,799 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfTPPidConnectionInfoT + ProtocolType BpfTPProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfTPConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfTPConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTPTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfTPEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPFdInfoT struct { + _ structs.HostLayout + Pid BpfTPPidKeyT + Fd int32 + Type uint32 +} + +type BpfTPFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfTPGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfTPHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfTPCallProtocolArgsT + Stream BpfTPHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfTPHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfTPPidConnectionInfoT + StreamId uint32 +} + +type BpfTPHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfTPConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfTPHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfTPConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfTPMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfTPMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfTPPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfTPPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Pid uint32 +} + +type BpfTPPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfTPProtocolType uint8 + +const ( + BpfTPProtocolTypeK_protocolTypeUnknown BpfTPProtocolType = 0 + BpfTPProtocolTypeK_protocolTypeMysql BpfTPProtocolType = 1 + BpfTPProtocolTypeK_protocolTypePostgres BpfTPProtocolType = 2 +) + +type BpfTPRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfTPSendArgsT struct { + _ structs.HostLayout + P_conn BpfTPPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfTPSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfTPSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfTPSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfTPSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfTPPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfTPProtocolType + Pad1 [3]uint8 + ConnInfo BpfTPConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfTPPidKeyT + Pad [4]uint8 +} + +type BpfTPTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Type uint32 +} + +// LoadBpfTP returns the embedded CollectionSpec for BpfTP. +func LoadBpfTP() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTP: %w", err) + } + + return spec, err +} + +// LoadBpfTPObjects loads BpfTP and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPObjects +// *BpfTPPrograms +// *BpfTPMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTP() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPSpecs struct { + BpfTPProgramSpecs + BpfTPMapSpecs + BpfTPVariableSpecs +} + +// BpfTPProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfTPMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfTPVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPObjects struct { + BpfTPPrograms + BpfTPMaps + BpfTPVariables +} + +func (o *BpfTPObjects) Close() error { + return _BpfTPClose( + &o.BpfTPPrograms, + &o.BpfTPMaps, + ) +} + +// BpfTPMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfTPMaps) Close() error { + return _BpfTPClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfTPVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfTPPrograms) Close() error { + return _BpfTPClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfTPClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftp_x86_bpfel.o +var _BpfTPBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_x86_bpfel.o new file mode 100644 index 000000000..b3fb3c350 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftp_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_arm64_bpfel.go new file mode 100644 index 000000000..fc6206b59 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_arm64_bpfel.go @@ -0,0 +1,802 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPDebugCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfTPDebugPidConnectionInfoT + ProtocolType BpfTPDebugProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfTPDebugConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfTPDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPDebugCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTPDebugTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfTPDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPDebugFdInfoT struct { + _ structs.HostLayout + Pid BpfTPDebugPidKeyT + Fd int32 + Type uint32 +} + +type BpfTPDebugFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfTPDebugGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfTPDebugHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfTPDebugCallProtocolArgsT + Stream BpfTPDebugHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfTPDebugHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPDebugHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfTPDebugPidConnectionInfoT + StreamId uint32 +} + +type BpfTPDebugHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfTPDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPDebugHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfTPDebugHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfTPDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfTPDebugMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfTPDebugMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfTPDebugPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfTPDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Pid uint32 +} + +type BpfTPDebugPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfTPDebugProtocolType uint8 + +const ( + BpfTPDebugProtocolTypeK_protocolTypeUnknown BpfTPDebugProtocolType = 0 + BpfTPDebugProtocolTypeK_protocolTypeMysql BpfTPDebugProtocolType = 1 + BpfTPDebugProtocolTypeK_protocolTypePostgres BpfTPDebugProtocolType = 2 +) + +type BpfTPDebugRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfTPDebugSendArgsT struct { + _ structs.HostLayout + P_conn BpfTPDebugPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPDebugSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfTPDebugSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfTPDebugSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfTPDebugSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfTPDebugSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfTPDebugPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPDebugTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfTPDebugProtocolType + Pad1 [3]uint8 + ConnInfo BpfTPDebugConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPDebugTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfTPDebugPidKeyT + Pad [4]uint8 +} + +type BpfTPDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Type uint32 +} + +// LoadBpfTPDebug returns the embedded CollectionSpec for BpfTPDebug. +func LoadBpfTPDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTPDebug: %w", err) + } + + return spec, err +} + +// LoadBpfTPDebugObjects loads BpfTPDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPDebugObjects +// *BpfTPDebugPrograms +// *BpfTPDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTPDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugSpecs struct { + BpfTPDebugProgramSpecs + BpfTPDebugMapSpecs + BpfTPDebugVariableSpecs +} + +// BpfTPDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfTPDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfTPDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugObjects struct { + BpfTPDebugPrograms + BpfTPDebugMaps + BpfTPDebugVariables +} + +func (o *BpfTPDebugObjects) Close() error { + return _BpfTPDebugClose( + &o.BpfTPDebugPrograms, + &o.BpfTPDebugMaps, + ) +} + +// BpfTPDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfTPDebugMaps) Close() error { + return _BpfTPDebugClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.DebugEvents, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfTPDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfTPDebugPrograms) Close() error { + return _BpfTPDebugClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfTPDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftpdebug_arm64_bpfel.o +var _BpfTPDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_arm64_bpfel.o new file mode 100644 index 000000000..52429c8c2 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_x86_bpfel.go new file mode 100644 index 000000000..aedeff122 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_x86_bpfel.go @@ -0,0 +1,802 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package generictracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPDebugCallProtocolArgsT struct { + _ structs.HostLayout + PidConn BpfTPDebugPidConnectionInfoT + ProtocolType BpfTPDebugProtocolType + Ssl uint8 + Direction uint8 + PacketType uint8 + SmallBuf [24]uint8 + Pad [4]uint8 + BytesLen int32 + OrigDport uint16 + Pad2 uint16 + U_buf uint64 + SelfRefParentId uint64 +} + +type BpfTPDebugConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfTPDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPDebugCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTPDebugTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfTPDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPDebugFdInfoT struct { + _ structs.HostLayout + Pid BpfTPDebugPidKeyT + Fd int32 + Type uint32 +} + +type BpfTPDebugFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfTPDebugGrpcFramesCtxT struct { + _ structs.HostLayout + PrevInfo BpfTPDebugHttp2GrpcRequestT + HasPrevInfo uint8 + FoundDataFrame uint8 + Iterations uint8 + TerminateSearch uint8 + Pos int32 + SavedBufPos int32 + SavedStreamId uint32 + Args BpfTPDebugCallProtocolArgsT + Stream BpfTPDebugHttp2ConnStreamT + Pad [4]uint8 +} + +type BpfTPDebugHttp2ConnInfoDataT struct { + _ structs.HostLayout + Id uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPDebugHttp2ConnStreamT struct { + _ structs.HostLayout + PidConn BpfTPDebugPidConnectionInfoT + StreamId uint32 +} + +type BpfTPDebugHttp2GrpcRequestT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Type uint8 + Pad0 [1]uint8 + ConnInfo BpfTPDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Data [256]uint8 + RetData [64]uint8 + Len int32 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + NewConnId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPDebugHttpConnectionMetadataT struct { + _ structs.HostLayout + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Type uint8 + Pad [3]uint8 +} + +type BpfTPDebugHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfTPDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfTPDebugMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfTPDebugMysqlStateData struct { + _ structs.HostLayout + PayloadLength [3]uint8 + SequenceId uint8 +} + +type BpfTPDebugPartialConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + S_port uint16 + D_port uint16 + TcpSeq uint32 +} + +type BpfTPDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Pid uint32 +} + +type BpfTPDebugPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfTPDebugProtocolType uint8 + +const ( + BpfTPDebugProtocolTypeK_protocolTypeUnknown BpfTPDebugProtocolType = 0 + BpfTPDebugProtocolTypeK_protocolTypeMysql BpfTPDebugProtocolType = 1 + BpfTPDebugProtocolTypeK_protocolTypePostgres BpfTPDebugProtocolType = 2 +) + +type BpfTPDebugRecvArgsT struct { + _ structs.HostLayout + SockPtr uint64 + IovecCtx [40]uint8 +} + +type BpfTPDebugSendArgsT struct { + _ structs.HostLayout + P_conn BpfTPDebugPidConnectionInfoT + Size uint64 + SockPtr uint64 + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPDebugSkMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Size uint16 + Inactive uint8 + Pad [1]uint8 +} + +type BpfTPDebugSockArgsT struct { + _ structs.HostLayout + Addr uint64 + Ts uint64 + Fd int32 + Failed uint8 + Pad [3]uint8 +} + +type BpfTPDebugSockPortNs struct { + _ structs.HostLayout + Netns uint32 + Port uint16 + Pad [2]uint8 +} + +type BpfTPDebugSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfTPDebugSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfTPDebugPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTPDebugTcpReqT struct { + _ structs.HostLayout + Flags uint8 + Ssl uint8 + Direction uint8 + HasLargeBuffers uint8 + ProtocolType BpfTPDebugProtocolType + Pad1 [3]uint8 + ConnInfo BpfTPDebugConnectionInfoT + Len uint32 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ExtraId uint64 + ReqLen uint32 + RespLen uint32 + Pad2 [4]uint8 + Buf [256]uint8 + Rbuf [128]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfTPDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPDebugTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfTPDebugPidKeyT + Pad [4]uint8 +} + +type BpfTPDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Type uint32 +} + +// LoadBpfTPDebug returns the embedded CollectionSpec for BpfTPDebug. +func LoadBpfTPDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTPDebug: %w", err) + } + + return spec, err +} + +// LoadBpfTPDebugObjects loads BpfTPDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPDebugObjects +// *BpfTPDebugPrograms +// *BpfTPDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTPDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugSpecs struct { + BpfTPDebugProgramSpecs + BpfTPDebugMapSpecs + BpfTPDebugVariableSpecs +} + +// BpfTPDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugProgramSpecs struct { + ObiContinue2ProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.ProgramSpec `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.ProgramSpec `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.ProgramSpec `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.ProgramSpec `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.ProgramSpec `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.ProgramSpec `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.ProgramSpec `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.ProgramSpec `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.ProgramSpec `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.ProgramSpec `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.ProgramSpec `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.ProgramSpec `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.ProgramSpec `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.ProgramSpec `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.ProgramSpec `ebpf:"obi_uv_fs_access"` +} + +// BpfTPDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugMapSpecs struct { + AcceptedConnections *ebpf.MapSpec `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.MapSpec `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.MapSpec `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + IovecMem *ebpf.MapSpec `ebpf:"iovec_mem"` + JumpTable *ebpf.MapSpec `ebpf:"jump_table"` + ListeningPorts *ebpf.MapSpec `ebpf:"listening_ports"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.MapSpec `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.MapSpec `ebpf:"mysql_state"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.MapSpec `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.MapSpec `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.MapSpec `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.MapSpec `ebpf:"protocol_cache"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.MapSpec `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.MapSpec `ebpf:"sk_buffers"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.MapSpec `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.MapSpec `ebpf:"upstream_init_args"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfTPDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.VariableSpec `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.VariableSpec `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + HighRequestVolume *ebpf.VariableSpec `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.VariableSpec `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.VariableSpec `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.VariableSpec `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.VariableSpec `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.VariableSpec `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.VariableSpec `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.VariableSpec `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.VariableSpec `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.VariableSpec `ebpf:"postgres_buffer_size"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugObjects struct { + BpfTPDebugPrograms + BpfTPDebugMaps + BpfTPDebugVariables +} + +func (o *BpfTPDebugObjects) Close() error { + return _BpfTPDebugClose( + &o.BpfTPDebugPrograms, + &o.BpfTPDebugMaps, + ) +} + +// BpfTPDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugMaps struct { + AcceptedConnections *ebpf.Map `ebpf:"accepted_connections"` + ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` + ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` + ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` + ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` + ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + GrpcFramesCtxMem *ebpf.Map `ebpf:"grpc_frames_ctx_mem"` + Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` + HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` + HttpLargeBuffersStorage *ebpf.Map `ebpf:"http_large_buffers_storage"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + IovecMem *ebpf.Map `ebpf:"iovec_mem"` + JumpTable *ebpf.Map `ebpf:"jump_table"` + ListeningPorts *ebpf.Map `ebpf:"listening_ports"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + MysqlLargeBuffersStorage *ebpf.Map `ebpf:"mysql_large_buffers_storage"` + MysqlState *ebpf.Map `ebpf:"mysql_state"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` + OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` + OngoingTcpReq *ebpf.Map `ebpf:"ongoing_tcp_req"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` + PostgresLargeBuffersStorage *ebpf.Map `ebpf:"postgres_large_buffers_storage"` + ProtocolArgsMem *ebpf.Map `ebpf:"protocol_args_mem"` + ProtocolCache *ebpf.Map `ebpf:"protocol_cache"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SkBufferMem *ebpf.Map `ebpf:"sk_buffer_mem"` + SkBuffers *ebpf.Map `ebpf:"sk_buffers"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` + TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` + TcpReqMem *ebpf.Map `ebpf:"tcp_req_mem"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + UpstreamInitArgs *ebpf.Map `ebpf:"upstream_init_args"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfTPDebugMaps) Close() error { + return _BpfTPDebugClose( + m.AcceptedConnections, + m.ActiveAcceptArgs, + m.ActiveConnectArgs, + m.ActiveRecvArgs, + m.ActiveSendArgs, + m.ActiveSendSockArgs, + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.ConnectionMetaMem, + m.CpSupportConnectInfo, + m.DebugEvents, + m.Events, + m.FdMap, + m.FdToConnection, + m.GrpcFramesCtxMem, + m.Http2InfoMem, + m.HttpInfoMem, + m.HttpLargeBuffersStorage, + m.IncomingTraceMap, + m.IovecMem, + m.JumpTable, + m.ListeningPorts, + m.MsgBuffers, + m.MysqlLargeBuffersStorage, + m.MysqlState, + m.NginxUpstream, + m.NodejsFdMap, + m.OngoingHttp, + m.OngoingHttp2Connections, + m.OngoingHttp2Grpc, + m.OngoingTcpReq, + m.OutgoingTraceMap, + m.PidCache, + m.PidTidToConn, + m.PostgresLargeBuffersStorage, + m.ProtocolArgsMem, + m.ProtocolCache, + m.ServerTraces, + m.ServerTracesAux, + m.SkBufferMem, + m.SkBuffers, + m.SslToConn, + m.SslToPidTid, + m.TcpConnectionMap, + m.TcpReqMem, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.UpstreamInitArgs, + m.ValidPids, + ) +} + +// BpfTPDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + PnUnused *ebpf.Variable `ebpf:"__pn_unused"` + CaptureHeaderBuffer *ebpf.Variable `ebpf:"capture_header_buffer"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + HighRequestVolume *ebpf.Variable `ebpf:"high_request_volume"` + HttpBufferSize *ebpf.Variable `ebpf:"http_buffer_size"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + MysqlBufferSize *ebpf.Variable `ebpf:"mysql_buffer_size"` + NgxConnectionS_fd *ebpf.Variable `ebpf:"ngx_connection_s_fd"` + NgxConnectionS_sockaddr *ebpf.Variable `ebpf:"ngx_connection_s_sockaddr"` + NgxHttpRequestS_conn *ebpf.Variable `ebpf:"ngx_http_request_s_conn"` + NgxHttpRequestS_upstream *ebpf.Variable `ebpf:"ngx_http_request_s_upstream"` + NgxHttpRevS_conn *ebpf.Variable `ebpf:"ngx_http_rev_s_conn"` + NgxHttpUpstreamS_conn *ebpf.Variable `ebpf:"ngx_http_upstream_s_conn"` + PostgresBufferSize *ebpf.Variable `ebpf:"postgres_buffer_size"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugPrograms struct { + ObiContinue2ProtocolHttp *ebpf.Program `ebpf:"obi_continue2_protocol_http"` + ObiContinueProtocolHttp *ebpf.Program `ebpf:"obi_continue_protocol_http"` + ObiHandleBufWithArgs *ebpf.Program `ebpf:"obi_handle_buf_with_args"` + ObiIterTcp *ebpf.Program `ebpf:"obi_iter_tcp"` + ObiKprobeInetCskListenStop *ebpf.Program `ebpf:"obi_kprobe_inet_csk_listen_stop"` + ObiKprobeSecuritySocketAccept *ebpf.Program `ebpf:"obi_kprobe_security_socket_accept"` + ObiKprobeSockDefErrorReport *ebpf.Program `ebpf:"obi_kprobe_sock_def_error_report"` + ObiKprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kprobe_sock_recvmsg"` + ObiKprobeSysConnect *ebpf.Program `ebpf:"obi_kprobe_sys_connect"` + ObiKprobeSysExit *ebpf.Program `ebpf:"obi_kprobe_sys_exit"` + ObiKprobeTcpCleanupRbuf *ebpf.Program `ebpf:"obi_kprobe_tcp_cleanup_rbuf"` + ObiKprobeTcpClose *ebpf.Program `ebpf:"obi_kprobe_tcp_close"` + ObiKprobeTcpConnect *ebpf.Program `ebpf:"obi_kprobe_tcp_connect"` + ObiKprobeTcpRateCheckAppLimited *ebpf.Program `ebpf:"obi_kprobe_tcp_rate_check_app_limited"` + ObiKprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_recvmsg"` + ObiKprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kprobe_tcp_sendmsg"` + ObiKprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_recvmsg"` + ObiKprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kprobe_unix_stream_sendmsg"` + ObiKretprobeSockRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_sock_recvmsg"` + ObiKretprobeSysAccept4 *ebpf.Program `ebpf:"obi_kretprobe_sys_accept4"` + ObiKretprobeSysClone *ebpf.Program `ebpf:"obi_kretprobe_sys_clone"` + ObiKretprobeSysConnect *ebpf.Program `ebpf:"obi_kretprobe_sys_connect"` + ObiKretprobeTcpRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_recvmsg"` + ObiKretprobeTcpSendmsg *ebpf.Program `ebpf:"obi_kretprobe_tcp_sendmsg"` + ObiKretprobeUnixStreamRecvmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_recvmsg"` + ObiKretprobeUnixStreamSendmsg *ebpf.Program `ebpf:"obi_kretprobe_unix_stream_sendmsg"` + ObiNgxEventConnectPeerRet *ebpf.Program `ebpf:"obi_ngx_event_connect_peer_ret"` + ObiNgxHttpUpstreamInit *ebpf.Program `ebpf:"obi_ngx_http_upstream_init"` + ObiProtocolHttp *ebpf.Program `ebpf:"obi_protocol_http"` + ObiProtocolHttp2 *ebpf.Program `ebpf:"obi_protocol_http2"` + ObiProtocolHttp2GrpcFrames *ebpf.Program `ebpf:"obi_protocol_http2_grpc_frames"` + ObiProtocolHttp2GrpcHandleEndFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_end_frame"` + ObiProtocolHttp2GrpcHandleStartFrame *ebpf.Program `ebpf:"obi_protocol_http2_grpc_handle_start_frame"` + ObiProtocolHttpLegacy *ebpf.Program `ebpf:"obi_protocol_http_legacy"` + ObiProtocolTcp *ebpf.Program `ebpf:"obi_protocol_tcp"` + ObiSocketHttpFilter *ebpf.Program `ebpf:"obi_socket__http_filter"` + ObiUprobeSslRead *ebpf.Program `ebpf:"obi_uprobe_ssl_read"` + ObiUprobeSslReadEx *ebpf.Program `ebpf:"obi_uprobe_ssl_read_ex"` + ObiUprobeSslShutdown *ebpf.Program `ebpf:"obi_uprobe_ssl_shutdown"` + ObiUprobeSslWrite *ebpf.Program `ebpf:"obi_uprobe_ssl_write"` + ObiUprobeSslWriteEx *ebpf.Program `ebpf:"obi_uprobe_ssl_write_ex"` + ObiUretprobeSslRead *ebpf.Program `ebpf:"obi_uretprobe_ssl_read"` + ObiUretprobeSslReadEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_read_ex"` + ObiUretprobeSslWrite *ebpf.Program `ebpf:"obi_uretprobe_ssl_write"` + ObiUretprobeSslWriteEx *ebpf.Program `ebpf:"obi_uretprobe_ssl_write_ex"` + ObiUvFsAccess *ebpf.Program `ebpf:"obi_uv_fs_access"` +} + +func (p *BpfTPDebugPrograms) Close() error { + return _BpfTPDebugClose( + p.ObiContinue2ProtocolHttp, + p.ObiContinueProtocolHttp, + p.ObiHandleBufWithArgs, + p.ObiIterTcp, + p.ObiKprobeInetCskListenStop, + p.ObiKprobeSecuritySocketAccept, + p.ObiKprobeSockDefErrorReport, + p.ObiKprobeSockRecvmsg, + p.ObiKprobeSysConnect, + p.ObiKprobeSysExit, + p.ObiKprobeTcpCleanupRbuf, + p.ObiKprobeTcpClose, + p.ObiKprobeTcpConnect, + p.ObiKprobeTcpRateCheckAppLimited, + p.ObiKprobeTcpRecvmsg, + p.ObiKprobeTcpSendmsg, + p.ObiKprobeUnixStreamRecvmsg, + p.ObiKprobeUnixStreamSendmsg, + p.ObiKretprobeSockRecvmsg, + p.ObiKretprobeSysAccept4, + p.ObiKretprobeSysClone, + p.ObiKretprobeSysConnect, + p.ObiKretprobeTcpRecvmsg, + p.ObiKretprobeTcpSendmsg, + p.ObiKretprobeUnixStreamRecvmsg, + p.ObiKretprobeUnixStreamSendmsg, + p.ObiNgxEventConnectPeerRet, + p.ObiNgxHttpUpstreamInit, + p.ObiProtocolHttp, + p.ObiProtocolHttp2, + p.ObiProtocolHttp2GrpcFrames, + p.ObiProtocolHttp2GrpcHandleEndFrame, + p.ObiProtocolHttp2GrpcHandleStartFrame, + p.ObiProtocolHttpLegacy, + p.ObiProtocolTcp, + p.ObiSocketHttpFilter, + p.ObiUprobeSslRead, + p.ObiUprobeSslReadEx, + p.ObiUprobeSslShutdown, + p.ObiUprobeSslWrite, + p.ObiUprobeSslWriteEx, + p.ObiUretprobeSslRead, + p.ObiUretprobeSslReadEx, + p.ObiUretprobeSslWrite, + p.ObiUretprobeSslWriteEx, + p.ObiUvFsAccess, + ) +} + +func _BpfTPDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftpdebug_x86_bpfel.o +var _BpfTPDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_x86_bpfel.o new file mode 100644 index 000000000..38481be45 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/generictracer/bpftpdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go new file mode 100644 index 000000000..646e469dc --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go @@ -0,0 +1,794 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfGoAddrKeyT + Timestamp uint64 +} + +type BpfGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfTpInfoT + Flags uint64 +} + +type BpfGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfTpInfoT +} + +type BpfGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfTpInfoT +} + +type BpfHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfTpInfoT +} + +type BpfKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfConnectionInfoT + Pad1 [4]uint8 + Tp BpfTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfConnectionInfoT + Tp BpfTpInfoT +} + +type BpfNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfTpInfoT + PrevTp BpfTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfConnectionInfoT + Tp BpfTpInfoT +} + +type BpfServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfTpInfoT + Conn BpfConnectionInfoT + Pad [4]uint8 +} + +type BpfStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfTpInfoT +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp BpfTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +type BpfTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfGrpcClientFuncInvocationT + S_key BpfStreamKeyT +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.ActiveSpans, + m.Events, + m.FetchRequests, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o new file mode 100644 index 000000000..07c78d473 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel-7e1360b9.o.tmp b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel-7e1360b9.o.tmp new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go new file mode 100644 index 000000000..0c4b66d8e --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go @@ -0,0 +1,794 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfGoAddrKeyT + Timestamp uint64 +} + +type BpfGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfTpInfoT + Flags uint64 +} + +type BpfGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfTpInfoT +} + +type BpfGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfTpInfoT +} + +type BpfHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfTpInfoT +} + +type BpfKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfConnectionInfoT + Pad1 [4]uint8 + Tp BpfTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfConnectionInfoT + Tp BpfTpInfoT +} + +type BpfNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfTpInfoT + PrevTp BpfTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfConnectionInfoT + Tp BpfTpInfoT +} + +type BpfServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfTpInfoT + Conn BpfConnectionInfoT + Pad [4]uint8 +} + +type BpfStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfTpInfoT +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp BpfTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +type BpfTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfGrpcClientFuncInvocationT + S_key BpfStreamKeyT +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.ActiveSpans, + m.Events, + m.FetchRequests, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o new file mode 100644 index 000000000..304d17965 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_arm64_bpfel.go new file mode 100644 index 000000000..36a475abd --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_arm64_bpfel.go @@ -0,0 +1,797 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfDebugGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfDebugGoAddrKeyT + Timestamp uint64 +} + +type BpfDebugGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfDebugTpInfoT + Flags uint64 +} + +type BpfDebugGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfDebugTpInfoT +} + +type BpfDebugGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfDebugTpInfoT +} + +type BpfDebugHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfDebugHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfDebugTpInfoT +} + +type BpfDebugKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfDebugConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfDebugKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfDebugConnectionInfoT + Pad1 [4]uint8 + Tp BpfDebugTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfDebugMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfDebugConnectionInfoT + Tp BpfDebugTpInfoT +} + +type BpfDebugNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfDebugOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfDebugOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfDebugTpInfoT + PrevTp BpfDebugTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfDebugProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfDebugRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfDebugConnectionInfoT + Tp BpfDebugTpInfoT +} + +type BpfDebugServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfDebugTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfDebugSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfDebugSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfDebugTpInfoT + Conn BpfDebugConnectionInfoT + Pad [4]uint8 +} + +type BpfDebugStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfDebugTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfDebugTpInfoT +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp BpfDebugTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +type BpfDebugTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfDebugGrpcClientFuncInvocationT + S_key BpfDebugStreamKeyT +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.ActiveSpans, + m.DebugEvents, + m.Events, + m.FetchRequests, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_arm64_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_arm64_bpfel.o new file mode 100644 index 000000000..8a79ac8b7 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_x86_bpfel.go new file mode 100644 index 000000000..d4cd9a82d --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_x86_bpfel.go @@ -0,0 +1,797 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfDebugGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfDebugGoAddrKeyT + Timestamp uint64 +} + +type BpfDebugGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfDebugTpInfoT + Flags uint64 +} + +type BpfDebugGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfDebugTpInfoT +} + +type BpfDebugGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfDebugTpInfoT +} + +type BpfDebugHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfDebugHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfDebugTpInfoT +} + +type BpfDebugKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfDebugConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfDebugKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfDebugConnectionInfoT + Pad1 [4]uint8 + Tp BpfDebugTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfDebugMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfDebugConnectionInfoT + Tp BpfDebugTpInfoT +} + +type BpfDebugNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfDebugOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfDebugOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfDebugTpInfoT + PrevTp BpfDebugTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfDebugProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfDebugRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfDebugConnectionInfoT + Tp BpfDebugTpInfoT +} + +type BpfDebugServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfDebugTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfDebugSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfDebugSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfDebugTpInfoT + Conn BpfDebugConnectionInfoT + Pad [4]uint8 +} + +type BpfDebugStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfDebugTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfDebugTpInfoT +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp BpfDebugTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +type BpfDebugTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfDebugGrpcClientFuncInvocationT + S_key BpfDebugStreamKeyT +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.ActiveSpans, + m.DebugEvents, + m.Events, + m.FetchRequests, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_x86_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_x86_bpfel.o new file mode 100644 index 000000000..e0fcb6c0d Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpfdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_arm64_bpfel.go new file mode 100644 index 000000000..3b7de515a --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_arm64_bpfel.go @@ -0,0 +1,820 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPTpInfoT + InitialN int64 +} + +type BpfTPGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfTPGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfTPGoAddrKeyT + Timestamp uint64 +} + +type BpfTPGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfTPTpInfoT + Flags uint64 +} + +type BpfTPGrpcFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPTpInfoT + Offset int64 +} + +type BpfTPGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfTPTpInfoT +} + +type BpfTPGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfTPTpInfoT +} + +type BpfTPHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfTPHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfTPTpInfoT +} + +type BpfTPKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfTPConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfTPKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfTPConnectionInfoT + Pad1 [4]uint8 + Tp BpfTPTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfTPMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfTPConnectionInfoT + Tp BpfTPTpInfoT +} + +type BpfTPNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfTPOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfTPOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfTPTpInfoT + PrevTp BpfTPTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfTPProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfTPRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfTPConnectionInfoT + Tp BpfTPTpInfoT +} + +type BpfTPServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfTPTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfTPSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfTPSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfTPTpInfoT + Conn BpfTPConnectionInfoT + Pad [4]uint8 +} + +type BpfTPStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfTPTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfTPTpInfoT +} + +type BpfTPTpInfoPidT struct { + _ structs.HostLayout + Tp BpfTPTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Type uint32 +} + +type BpfTPTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfTPGrpcClientFuncInvocationT + S_key BpfTPStreamKeyT +} + +// LoadBpfTP returns the embedded CollectionSpec for BpfTP. +func LoadBpfTP() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTP: %w", err) + } + + return spec, err +} + +// LoadBpfTPObjects loads BpfTP and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPObjects +// *BpfTPPrograms +// *BpfTPMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTP() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPSpecs struct { + BpfTPProgramSpecs + BpfTPMapSpecs + BpfTPVariableSpecs +} + +// BpfTPProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfTPMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` + Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfTPVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPObjects struct { + BpfTPPrograms + BpfTPMaps + BpfTPVariables +} + +func (o *BpfTPObjects) Close() error { + return _BpfTPClose( + &o.BpfTPPrograms, + &o.BpfTPMaps, + ) +} + +// BpfTPMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` + Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfTPMaps) Close() error { + return _BpfTPClose( + m.ActiveSpans, + m.Events, + m.FetchRequests, + m.FramerInvocationMap, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.GrpcFramerInvocationMap, + m.HeaderReqMap, + m.Http2ReqMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfTPVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfTPPrograms) Close() error { + return _BpfTPClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfTPClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftp_arm64_bpfel.o +var _BpfTPBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_arm64_bpfel.o new file mode 100644 index 000000000..121eda931 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_x86_bpfel.go new file mode 100644 index 000000000..91863a16e --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_x86_bpfel.go @@ -0,0 +1,820 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPTpInfoT + InitialN int64 +} + +type BpfTPGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfTPGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfTPGoAddrKeyT + Timestamp uint64 +} + +type BpfTPGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfTPTpInfoT + Flags uint64 +} + +type BpfTPGrpcFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPTpInfoT + Offset int64 +} + +type BpfTPGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfTPTpInfoT +} + +type BpfTPGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfTPTpInfoT +} + +type BpfTPHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfTPHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfTPTpInfoT +} + +type BpfTPKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfTPConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfTPKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfTPConnectionInfoT + Pad1 [4]uint8 + Tp BpfTPTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfTPMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfTPConnectionInfoT + Tp BpfTPTpInfoT +} + +type BpfTPNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfTPOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfTPOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfTPTpInfoT + PrevTp BpfTPTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfTPProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfTPRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfTPConnectionInfoT + Tp BpfTPTpInfoT +} + +type BpfTPServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfTPTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfTPSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfTPSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfTPTpInfoT + Conn BpfTPConnectionInfoT + Pad [4]uint8 +} + +type BpfTPStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfTPTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfTPTpInfoT +} + +type BpfTPTpInfoPidT struct { + _ structs.HostLayout + Tp BpfTPTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPConnectionInfoT + Type uint32 +} + +type BpfTPTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfTPGrpcClientFuncInvocationT + S_key BpfTPStreamKeyT +} + +// LoadBpfTP returns the embedded CollectionSpec for BpfTP. +func LoadBpfTP() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTP: %w", err) + } + + return spec, err +} + +// LoadBpfTPObjects loads BpfTP and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPObjects +// *BpfTPPrograms +// *BpfTPMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTP() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPSpecs struct { + BpfTPProgramSpecs + BpfTPMapSpecs + BpfTPVariableSpecs +} + +// BpfTPProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfTPMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` + Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfTPVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPObjects struct { + BpfTPPrograms + BpfTPMaps + BpfTPVariables +} + +func (o *BpfTPObjects) Close() error { + return _BpfTPClose( + &o.BpfTPPrograms, + &o.BpfTPMaps, + ) +} + +// BpfTPMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` + Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfTPMaps) Close() error { + return _BpfTPClose( + m.ActiveSpans, + m.Events, + m.FetchRequests, + m.FramerInvocationMap, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.GrpcFramerInvocationMap, + m.HeaderReqMap, + m.Http2ReqMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfTPVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfTPPrograms) Close() error { + return _BpfTPClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfTPClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftp_x86_bpfel.o +var _BpfTPBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_x86_bpfel.o new file mode 100644 index 000000000..7b3c61e91 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftp_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_arm64_bpfel.go new file mode 100644 index 000000000..9ab478d58 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_arm64_bpfel.go @@ -0,0 +1,823 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPDebugFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPDebugTpInfoT + InitialN int64 +} + +type BpfTPDebugGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfTPDebugGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfTPDebugGoAddrKeyT + Timestamp uint64 +} + +type BpfTPDebugGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfTPDebugTpInfoT + Flags uint64 +} + +type BpfTPDebugGrpcFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPDebugTpInfoT + Offset int64 +} + +type BpfTPDebugGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfTPDebugHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfTPDebugConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfTPDebugKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfTPDebugConnectionInfoT + Pad1 [4]uint8 + Tp BpfTPDebugTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfTPDebugMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfTPDebugConnectionInfoT + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfTPDebugOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfTPDebugOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfTPDebugTpInfoT + PrevTp BpfTPDebugTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfTPDebugProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfTPDebugRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfTPDebugConnectionInfoT + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfTPDebugTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfTPDebugSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfTPDebugSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfTPDebugTpInfoT + Conn BpfTPDebugConnectionInfoT + Pad [4]uint8 +} + +type BpfTPDebugStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfTPDebugTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugTpInfoPidT struct { + _ structs.HostLayout + Tp BpfTPDebugTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPDebugTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Type uint32 +} + +type BpfTPDebugTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfTPDebugGrpcClientFuncInvocationT + S_key BpfTPDebugStreamKeyT +} + +// LoadBpfTPDebug returns the embedded CollectionSpec for BpfTPDebug. +func LoadBpfTPDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTPDebug: %w", err) + } + + return spec, err +} + +// LoadBpfTPDebugObjects loads BpfTPDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPDebugObjects +// *BpfTPDebugPrograms +// *BpfTPDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTPDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugSpecs struct { + BpfTPDebugProgramSpecs + BpfTPDebugMapSpecs + BpfTPDebugVariableSpecs +} + +// BpfTPDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfTPDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` + Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfTPDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugObjects struct { + BpfTPDebugPrograms + BpfTPDebugMaps + BpfTPDebugVariables +} + +func (o *BpfTPDebugObjects) Close() error { + return _BpfTPDebugClose( + &o.BpfTPDebugPrograms, + &o.BpfTPDebugMaps, + ) +} + +// BpfTPDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` + Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfTPDebugMaps) Close() error { + return _BpfTPDebugClose( + m.ActiveSpans, + m.DebugEvents, + m.Events, + m.FetchRequests, + m.FramerInvocationMap, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.GrpcFramerInvocationMap, + m.HeaderReqMap, + m.Http2ReqMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfTPDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfTPDebugPrograms) Close() error { + return _BpfTPDebugClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfTPDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftpdebug_arm64_bpfel.o +var _BpfTPDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_arm64_bpfel.o new file mode 100644 index 000000000..f4ec7e665 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_x86_bpfel.go new file mode 100644 index 000000000..66b905896 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_x86_bpfel.go @@ -0,0 +1,823 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package gotracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfTPDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfTPDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfTPDebugFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPDebugTpInfoT + InitialN int64 +} + +type BpfTPDebugGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfTPDebugGoroutineMetadata struct { + _ structs.HostLayout + Parent BpfTPDebugGoAddrKeyT + Timestamp uint64 +} + +type BpfTPDebugGrpcClientFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Cc uint64 + Method uint64 + MethodLen uint64 + Tp BpfTPDebugTpInfoT + Flags uint64 +} + +type BpfTPDebugGrpcFramerFuncInvocationT struct { + _ structs.HostLayout + FramerPtr uint64 + Tp BpfTPDebugTpInfoT + Offset int64 +} + +type BpfTPDebugGrpcSrvFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Stream uint64 + St uint64 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugGrpcTransportsT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Type uint8 + Pad [3]uint8 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugHttpClientDataT struct { + _ structs.HostLayout + ContentLength int64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Path [100]uint8 + Host [100]uint8 + Scheme [10]uint8 + Method [7]uint8 + Pad [3]uint8 +} + +type BpfTPDebugHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugKafkaClientReqT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Buf [256]uint8 + Conn BpfTPDebugConnectionInfoT + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } +} + +type BpfTPDebugKafkaGoReqT struct { + _ structs.HostLayout + Type uint8 + Op uint8 + Pad0 [2]uint8 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Conn BpfTPDebugConnectionInfoT + Pad1 [4]uint8 + Tp BpfTPDebugTpInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Topic [64]uint8 +} + +type BpfTPDebugMongoGoClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Op [32]uint8 + Db [32]uint8 + Coll [32]uint8 + Conn BpfTPDebugConnectionInfoT + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugNewFuncInvocationT struct { + _ structs.HostLayout + Parent uint64 +} + +type BpfTPDebugOffTableT struct { + _ structs.HostLayout + Table [64]uint64 +} + +type BpfTPDebugOtelSpanT struct { + _ structs.HostLayout + Type uint8 + Pad [7]uint8 + StartTime uint64 + EndTime uint64 + ParentGo uint64 + Tp BpfTPDebugTpInfoT + PrevTp BpfTPDebugTpInfoT + Status uint32 + SpanName struct { + _ structs.HostLayout + Buf [64]uint8 + } + SpanDescription struct { + _ structs.HostLayout + Buf [64]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + SpanAttrs struct { + _ structs.HostLayout + Attrs [16]struct { + _ structs.HostLayout + ValLength uint16 + Vtype uint8 + Reserved uint8 + Key [32]uint8 + Value [128]uint8 + } + ValidAttrs uint8 + Apad uint8 + } + Epad [6]uint8 +} + +type BpfTPDebugProduceReqT struct { + _ structs.HostLayout + MsgPtr uint64 + ConnPtr uint64 + StartMonotimeNs uint64 +} + +type BpfTPDebugRedisClientReqT struct { + _ structs.HostLayout + Type uint8 + Err uint8 + Pad [6]uint8 + StartMonotimeNs uint64 + EndMonotimeNs uint64 + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Buf [256]uint8 + Conn BpfTPDebugConnectionInfoT + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugServerHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + ContentLength uint64 + ResponseLength uint64 + Status uint64 + RpcRequestAddr uint64 + Tp BpfTPDebugTpInfoT + Method [7]uint8 + Path [100]uint8 + Pad [5]uint8 +} + +type BpfTPDebugSpanInfoT struct { + _ structs.HostLayout + Name struct { + _ structs.HostLayout + Buf [64]uint8 + } + OptsPtr uint64 + OptsLen uint64 +} + +type BpfTPDebugSqlFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + SqlParam uint64 + QueryLen uint64 + Tp BpfTPDebugTpInfoT + Conn BpfTPDebugConnectionInfoT + Pad [4]uint8 +} + +type BpfTPDebugStreamKeyT struct { + _ structs.HostLayout + ConnPtr uint64 + StreamId uint32 + Pad uint32 +} + +type BpfTPDebugTopicT struct { + _ structs.HostLayout + Name [64]int8 + Tp BpfTPDebugTpInfoT +} + +type BpfTPDebugTpInfoPidT struct { + _ structs.HostLayout + Tp BpfTPDebugTpInfoT + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTPDebugTpInfoT struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 +} + +type BpfTPDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfTPDebugConnectionInfoT + Type uint32 +} + +type BpfTPDebugTransportNewClientInvocationT struct { + _ structs.HostLayout + Inv BpfTPDebugGrpcClientFuncInvocationT + S_key BpfTPDebugStreamKeyT +} + +// LoadBpfTPDebug returns the embedded CollectionSpec for BpfTPDebug. +func LoadBpfTPDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfTPDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfTPDebug: %w", err) + } + + return spec, err +} + +// LoadBpfTPDebugObjects loads BpfTPDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfTPDebugObjects +// *BpfTPDebugPrograms +// *BpfTPDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfTPDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfTPDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfTPDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugSpecs struct { + BpfTPDebugProgramSpecs + BpfTPDebugMapSpecs + BpfTPDebugVariableSpecs +} + +// BpfTPDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugProgramSpecs struct { + ObiUprobeClientConnClose *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.ProgramSpec `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.ProgramSpec `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.ProgramSpec `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.ProgramSpec `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.ProgramSpec `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.ProgramSpec `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.ProgramSpec `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.ProgramSpec `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.ProgramSpec `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.ProgramSpec `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.ProgramSpec `ebpf:"obi_uprobe_writer_write_messages"` +} + +// BpfTPDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugMapSpecs struct { + ActiveSpans *ebpf.MapSpec `ebpf:"active_spans"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + Events *ebpf.MapSpec `ebpf:"events"` + FetchRequests *ebpf.MapSpec `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.MapSpec `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` + Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.MapSpec `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.MapSpec `ebpf:"kafka_requests"` + Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` + OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.MapSpec `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.MapSpec `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.MapSpec `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.MapSpec `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.MapSpec `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.MapSpec `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.MapSpec `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.MapSpec `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.MapSpec `ebpf:"produce_traceparents"` + RedisWrites *ebpf.MapSpec `ebpf:"redis_writes"` + SpanMem *ebpf.MapSpec `ebpf:"span_mem"` + SpanNames *ebpf.MapSpec `ebpf:"span_names"` + TempHeaderMemStore *ebpf.MapSpec `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.MapSpec `ebpf:"transport_new_client_invocations"` +} + +// BpfTPDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfTPDebugVariableSpecs struct { + ERROR_KEY *ebpf.VariableSpec `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.VariableSpec `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.VariableSpec `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.VariableSpec `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.VariableSpec `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.VariableSpec `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.VariableSpec `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.VariableSpec `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.VariableSpec `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.VariableSpec `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.VariableSpec `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.VariableSpec `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.VariableSpec `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugObjects struct { + BpfTPDebugPrograms + BpfTPDebugMaps + BpfTPDebugVariables +} + +func (o *BpfTPDebugObjects) Close() error { + return _BpfTPDebugClose( + &o.BpfTPDebugPrograms, + &o.BpfTPDebugMaps, + ) +} + +// BpfTPDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugMaps struct { + ActiveSpans *ebpf.Map `ebpf:"active_spans"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + Events *ebpf.Map `ebpf:"events"` + FetchRequests *ebpf.Map `ebpf:"fetch_requests"` + FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` + GoOffsetsMap *ebpf.Map `ebpf:"go_offsets_map"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` + GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` + HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` + Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` + Http2ServerRequestsTp *ebpf.Map `ebpf:"http2_server_requests_tp"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + KafkaRequests *ebpf.Map `ebpf:"kafka_requests"` + Newproc1 *ebpf.Map `ebpf:"newproc1"` + OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` + OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` + OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` + OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` + OngoingGrpcOperateHeaders *ebpf.Map `ebpf:"ongoing_grpc_operate_headers"` + OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` + OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` + OngoingGrpcTransports *ebpf.Map `ebpf:"ongoing_grpc_transports"` + OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` + OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` + OngoingKafkaRequests *ebpf.Map `ebpf:"ongoing_kafka_requests"` + OngoingMongoRequests *ebpf.Map `ebpf:"ongoing_mongo_requests"` + OngoingProduceMessages *ebpf.Map `ebpf:"ongoing_produce_messages"` + OngoingProduceTopics *ebpf.Map `ebpf:"ongoing_produce_topics"` + OngoingRedisRequests *ebpf.Map `ebpf:"ongoing_redis_requests"` + OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` + OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` + OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + ProduceRequests *ebpf.Map `ebpf:"produce_requests"` + ProduceTraceparents *ebpf.Map `ebpf:"produce_traceparents"` + RedisWrites *ebpf.Map `ebpf:"redis_writes"` + SpanMem *ebpf.Map `ebpf:"span_mem"` + SpanNames *ebpf.Map `ebpf:"span_names"` + TempHeaderMemStore *ebpf.Map `ebpf:"temp_header_mem_store"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + TransportNewClientInvocations *ebpf.Map `ebpf:"transport_new_client_invocations"` +} + +func (m *BpfTPDebugMaps) Close() error { + return _BpfTPDebugClose( + m.ActiveSpans, + m.DebugEvents, + m.Events, + m.FetchRequests, + m.FramerInvocationMap, + m.GoOffsetsMap, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.GoTraceMap, + m.GrpcFramerInvocationMap, + m.HeaderReqMap, + m.Http2ReqMap, + m.Http2ServerRequestsTp, + m.IncomingTraceMap, + m.KafkaRequests, + m.Newproc1, + m.OngoingClientConnections, + m.OngoingGoroutines, + m.OngoingGrpcClientRequests, + m.OngoingGrpcHeaderWrites, + m.OngoingGrpcOperateHeaders, + m.OngoingGrpcRequestStatus, + m.OngoingGrpcServerRequests, + m.OngoingGrpcTransports, + m.OngoingHttpClientRequestsData, + m.OngoingHttpServerRequests, + m.OngoingKafkaRequests, + m.OngoingMongoRequests, + m.OngoingProduceMessages, + m.OngoingProduceTopics, + m.OngoingRedisRequests, + m.OngoingServerConnections, + m.OngoingSqlQueries, + m.OngoingStreams, + m.OutgoingTraceMap, + m.ProduceRequests, + m.ProduceTraceparents, + m.RedisWrites, + m.SpanMem, + m.SpanNames, + m.TempHeaderMemStore, + m.TraceMap, + m.TransportNewClientInvocations, + ) +} + +// BpfTPDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugVariables struct { + ERROR_KEY *ebpf.Variable `ebpf:"ERROR_KEY"` + ERROR_KEY_SIZE *ebpf.Variable `ebpf:"ERROR_KEY_SIZE"` + AttrTypeBool *ebpf.Variable `ebpf:"attr_type_bool"` + AttrTypeBoolslice *ebpf.Variable `ebpf:"attr_type_boolslice"` + AttrTypeFloat64 *ebpf.Variable `ebpf:"attr_type_float64"` + AttrTypeFloat64slice *ebpf.Variable `ebpf:"attr_type_float64slice"` + AttrTypeInt64 *ebpf.Variable `ebpf:"attr_type_int64"` + AttrTypeInt64slice *ebpf.Variable `ebpf:"attr_type_int64slice"` + AttrTypeInvalid *ebpf.Variable `ebpf:"attr_type_invalid"` + AttrTypeString *ebpf.Variable `ebpf:"attr_type_string"` + AttrTypeStringslice *ebpf.Variable `ebpf:"attr_type_stringslice"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + HuffmanCodeLen *ebpf.Variable `ebpf:"huffman_code_len"` + HuffmanCodes *ebpf.Variable `ebpf:"huffman_codes"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfTPDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfTPDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfTPDebugPrograms struct { + ObiUprobeClientConnClose *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Close"` + ObiUprobeClientConnInvoke *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke"` + ObiUprobeClientConnInvokeReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_Invoke_return"` + ObiUprobeClientConnNewStream *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream"` + ObiUprobeClientConnNewStreamReturn *ebpf.Program `ebpf:"obi_uprobe_ClientConn_NewStream_return"` + ObiUprobeRecordError *ebpf.Program `ebpf:"obi_uprobe_RecordError"` + ObiUprobeServeHTTP *ebpf.Program `ebpf:"obi_uprobe_ServeHTTP"` + ObiUprobeServeHTTPReturns *ebpf.Program `ebpf:"obi_uprobe_ServeHTTPReturns"` + ObiUprobeSetAttributes *ebpf.Program `ebpf:"obi_uprobe_SetAttributes"` + ObiUprobeSetName *ebpf.Program `ebpf:"obi_uprobe_SetName"` + ObiUprobeSetStatus *ebpf.Program `ebpf:"obi_uprobe_SetStatus"` + ObiUprobeClientStreamRecvMsgReturn *ebpf.Program `ebpf:"obi_uprobe_clientStream_RecvMsg_return"` + ObiUprobeClientRoundTrip *ebpf.Program `ebpf:"obi_uprobe_client_roundTrip"` + ObiUprobeConnServe *ebpf.Program `ebpf:"obi_uprobe_connServe"` + ObiUprobeConnServeRet *ebpf.Program `ebpf:"obi_uprobe_connServeRet"` + ObiUprobeExecDC *ebpf.Program `ebpf:"obi_uprobe_execDC"` + ObiUprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders"` + ObiUprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_grpcFramerWriteHeaders_returns"` + ObiUprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders"` + ObiUprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"obi_uprobe_http2FramerWriteHeaders_returns"` + ObiUprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"obi_uprobe_http2ResponseWriterStateWriteHeader"` + ObiUprobeHttp2RoundTrip *ebpf.Program `ebpf:"obi_uprobe_http2RoundTrip"` + ObiUprobeHttp2ServerOperateHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_operateHeaders"` + ObiUprobeHttp2ServerProcessHeaders *ebpf.Program `ebpf:"obi_uprobe_http2Server_processHeaders"` + ObiUprobeHttp2WriteHeaders *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders"` + ObiUprobeHttp2WriteHeadersVendored *ebpf.Program `ebpf:"obi_uprobe_http2WriteHeaders_vendored"` + ObiUprobeHttp2serverConnRunHandler *ebpf.Program `ebpf:"obi_uprobe_http2serverConn_runHandler"` + ObiUprobeJsonrpcReadRequestHeader *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeader"` + ObiUprobeJsonrpcReadRequestHeaderReturns *ebpf.Program `ebpf:"obi_uprobe_jsonrpcReadRequestHeaderReturns"` + ObiUprobeMongoOpAggregate *ebpf.Program `ebpf:"obi_uprobe_mongo_op_aggregate"` + ObiUprobeMongoOpCountDocuments *ebpf.Program `ebpf:"obi_uprobe_mongo_op_countDocuments"` + ObiUprobeMongoOpDelete *ebpf.Program `ebpf:"obi_uprobe_mongo_op_delete"` + ObiUprobeMongoOpDistinct *ebpf.Program `ebpf:"obi_uprobe_mongo_op_distinct"` + ObiUprobeMongoOpDrop *ebpf.Program `ebpf:"obi_uprobe_mongo_op_drop"` + ObiUprobeMongoOpEstimatedDocumentCount *ebpf.Program `ebpf:"obi_uprobe_mongo_op_estimatedDocumentCount"` + ObiUprobeMongoOpExecute *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute"` + ObiUprobeMongoOpExecuteRet *ebpf.Program `ebpf:"obi_uprobe_mongo_op_execute_ret"` + ObiUprobeMongoOpFind *ebpf.Program `ebpf:"obi_uprobe_mongo_op_find"` + ObiUprobeMongoOpFindAndModify *ebpf.Program `ebpf:"obi_uprobe_mongo_op_findAndModify"` + ObiUprobeMongoOpInsert *ebpf.Program `ebpf:"obi_uprobe_mongo_op_insert"` + ObiUprobeMongoOpUpdateOrReplace *ebpf.Program `ebpf:"obi_uprobe_mongo_op_updateOrReplace"` + ObiUprobeNetFdRead *ebpf.Program `ebpf:"obi_uprobe_netFdRead"` + ObiUprobeNonRecordingSpanEnd *ebpf.Program `ebpf:"obi_uprobe_nonRecordingSpan_End"` + ObiUprobePersistConnRoundTrip *ebpf.Program `ebpf:"obi_uprobe_persistConnRoundTrip"` + ObiUprobeProcGoexit1 *ebpf.Program `ebpf:"obi_uprobe_proc_goexit1"` + ObiUprobeProcNewproc1 *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1"` + ObiUprobeProcNewproc1Ret *ebpf.Program `ebpf:"obi_uprobe_proc_newproc1_ret"` + ObiUprobeProtocolRoundtrip *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip"` + ObiUprobeProtocolRoundtripRet *ebpf.Program `ebpf:"obi_uprobe_protocol_roundtrip_ret"` + ObiUprobeQueryDC *ebpf.Program `ebpf:"obi_uprobe_queryDC"` + ObiUprobeQueryReturn *ebpf.Program `ebpf:"obi_uprobe_queryReturn"` + ObiUprobeReadContinuedLineSliceReturns *ebpf.Program `ebpf:"obi_uprobe_readContinuedLineSliceReturns"` + ObiUprobeReadRequestReturns *ebpf.Program `ebpf:"obi_uprobe_readRequestReturns"` + ObiUprobeReadRequestStart *ebpf.Program `ebpf:"obi_uprobe_readRequestStart"` + ObiUprobeReaderRead *ebpf.Program `ebpf:"obi_uprobe_reader_read"` + ObiUprobeReaderReadRet *ebpf.Program `ebpf:"obi_uprobe_reader_read_ret"` + ObiUprobeReaderSendMessage *ebpf.Program `ebpf:"obi_uprobe_reader_send_message"` + ObiUprobeRedisProcess *ebpf.Program `ebpf:"obi_uprobe_redis_process"` + ObiUprobeRedisProcessRet *ebpf.Program `ebpf:"obi_uprobe_redis_process_ret"` + ObiUprobeRedisWithWriter *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer"` + ObiUprobeRedisWithWriterRet *ebpf.Program `ebpf:"obi_uprobe_redis_with_writer_ret"` + ObiUprobeRoundTrip *ebpf.Program `ebpf:"obi_uprobe_roundTrip"` + ObiUprobeRoundTripReturn *ebpf.Program `ebpf:"obi_uprobe_roundTripReturn"` + ObiUprobeSaramaBrokerWrite *ebpf.Program `ebpf:"obi_uprobe_sarama_broker_write"` + ObiUprobeSaramaResponsePromiseHandle *ebpf.Program `ebpf:"obi_uprobe_sarama_response_promise_handle"` + ObiUprobeSaramaSendInternal *ebpf.Program `ebpf:"obi_uprobe_sarama_sendInternal"` + ObiUprobeServerHandleStream *ebpf.Program `ebpf:"obi_uprobe_server_handleStream"` + ObiUprobeServerHandleStreamReturn *ebpf.Program `ebpf:"obi_uprobe_server_handleStream_return"` + ObiUprobeServerHandlerTransportHandleStreams *ebpf.Program `ebpf:"obi_uprobe_server_handler_transport_handle_streams"` + ObiUprobeTracerStart *ebpf.Program `ebpf:"obi_uprobe_tracer_Start"` + ObiUprobeTracerStartReturns *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_Returns"` + ObiUprobeTracerStartGlobal *ebpf.Program `ebpf:"obi_uprobe_tracer_Start_global"` + ObiUprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream"` + ObiUprobeTransportHttp2ClientNewStreamReturns *ebpf.Program `ebpf:"obi_uprobe_transport_http2Client_NewStream_Returns"` + ObiUprobeTransportWriteStatus *ebpf.Program `ebpf:"obi_uprobe_transport_writeStatus"` + ObiUprobeWriteSubset *ebpf.Program `ebpf:"obi_uprobe_writeSubset"` + ObiUprobeWriterProduce *ebpf.Program `ebpf:"obi_uprobe_writer_produce"` + ObiUprobeWriterWriteMessages *ebpf.Program `ebpf:"obi_uprobe_writer_write_messages"` +} + +func (p *BpfTPDebugPrograms) Close() error { + return _BpfTPDebugClose( + p.ObiUprobeClientConnClose, + p.ObiUprobeClientConnInvoke, + p.ObiUprobeClientConnInvokeReturn, + p.ObiUprobeClientConnNewStream, + p.ObiUprobeClientConnNewStreamReturn, + p.ObiUprobeRecordError, + p.ObiUprobeServeHTTP, + p.ObiUprobeServeHTTPReturns, + p.ObiUprobeSetAttributes, + p.ObiUprobeSetName, + p.ObiUprobeSetStatus, + p.ObiUprobeClientStreamRecvMsgReturn, + p.ObiUprobeClientRoundTrip, + p.ObiUprobeConnServe, + p.ObiUprobeConnServeRet, + p.ObiUprobeExecDC, + p.ObiUprobeGrpcFramerWriteHeaders, + p.ObiUprobeGrpcFramerWriteHeadersReturns, + p.ObiUprobeHttp2FramerWriteHeaders, + p.ObiUprobeHttp2FramerWriteHeadersReturns, + p.ObiUprobeHttp2ResponseWriterStateWriteHeader, + p.ObiUprobeHttp2RoundTrip, + p.ObiUprobeHttp2ServerOperateHeaders, + p.ObiUprobeHttp2ServerProcessHeaders, + p.ObiUprobeHttp2WriteHeaders, + p.ObiUprobeHttp2WriteHeadersVendored, + p.ObiUprobeHttp2serverConnRunHandler, + p.ObiUprobeJsonrpcReadRequestHeader, + p.ObiUprobeJsonrpcReadRequestHeaderReturns, + p.ObiUprobeMongoOpAggregate, + p.ObiUprobeMongoOpCountDocuments, + p.ObiUprobeMongoOpDelete, + p.ObiUprobeMongoOpDistinct, + p.ObiUprobeMongoOpDrop, + p.ObiUprobeMongoOpEstimatedDocumentCount, + p.ObiUprobeMongoOpExecute, + p.ObiUprobeMongoOpExecuteRet, + p.ObiUprobeMongoOpFind, + p.ObiUprobeMongoOpFindAndModify, + p.ObiUprobeMongoOpInsert, + p.ObiUprobeMongoOpUpdateOrReplace, + p.ObiUprobeNetFdRead, + p.ObiUprobeNonRecordingSpanEnd, + p.ObiUprobePersistConnRoundTrip, + p.ObiUprobeProcGoexit1, + p.ObiUprobeProcNewproc1, + p.ObiUprobeProcNewproc1Ret, + p.ObiUprobeProtocolRoundtrip, + p.ObiUprobeProtocolRoundtripRet, + p.ObiUprobeQueryDC, + p.ObiUprobeQueryReturn, + p.ObiUprobeReadContinuedLineSliceReturns, + p.ObiUprobeReadRequestReturns, + p.ObiUprobeReadRequestStart, + p.ObiUprobeReaderRead, + p.ObiUprobeReaderReadRet, + p.ObiUprobeReaderSendMessage, + p.ObiUprobeRedisProcess, + p.ObiUprobeRedisProcessRet, + p.ObiUprobeRedisWithWriter, + p.ObiUprobeRedisWithWriterRet, + p.ObiUprobeRoundTrip, + p.ObiUprobeRoundTripReturn, + p.ObiUprobeSaramaBrokerWrite, + p.ObiUprobeSaramaResponsePromiseHandle, + p.ObiUprobeSaramaSendInternal, + p.ObiUprobeServerHandleStream, + p.ObiUprobeServerHandleStreamReturn, + p.ObiUprobeServerHandlerTransportHandleStreams, + p.ObiUprobeTracerStart, + p.ObiUprobeTracerStartReturns, + p.ObiUprobeTracerStartGlobal, + p.ObiUprobeTransportHttp2ClientNewStream, + p.ObiUprobeTransportHttp2ClientNewStreamReturns, + p.ObiUprobeTransportWriteStatus, + p.ObiUprobeWriteSubset, + p.ObiUprobeWriterProduce, + p.ObiUprobeWriterWriteMessages, + ) +} + +func _BpfTPDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpftpdebug_x86_bpfel.o +var _BpfTPDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_x86_bpfel.o new file mode 100644 index 000000000..7565f3207 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gotracer/bpftpdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_arm64_bpfel.go new file mode 100644 index 000000000..3a698034d --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_arm64_bpfel.go @@ -0,0 +1,206 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package gpuevent + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfGpuKernelLaunchT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + KernFuncOff uint64 + GridX int32 + GridY int32 + GridZ int32 + BlockX int32 + BlockY int32 + BlockZ int32 + Stream uint64 + Args [16]uint64 + UstackSz uint64 + Ustack [128]uint64 +} + +type BpfGpuMallocT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +type BpfGpuMemcpyT struct { + _ structs.HostLayout + Flags uint8 + Kind uint8 + Pad [2]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + HandleCudaLaunch *ebpf.ProgramSpec `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.ProgramSpec `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.ProgramSpec `ebpf:"handle_cuda_memcpy"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + Rb *ebpf.MapSpec `ebpf:"rb"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + ProgCfg *ebpf.VariableSpec `ebpf:"prog_cfg"` + UnusedGpu *ebpf.VariableSpec `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.VariableSpec `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.VariableSpec `ebpf:"unused_gpu2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + PidCache *ebpf.Map `ebpf:"pid_cache"` + Rb *ebpf.Map `ebpf:"rb"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.PidCache, + m.Rb, + m.ValidPids, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + ProgCfg *ebpf.Variable `ebpf:"prog_cfg"` + UnusedGpu *ebpf.Variable `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.Variable `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.Variable `ebpf:"unused_gpu2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + HandleCudaLaunch *ebpf.Program `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.Program `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.Program `ebpf:"handle_cuda_memcpy"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.HandleCudaLaunch, + p.HandleCudaMalloc, + p.HandleCudaMemcpy, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_arm64_bpfel.o new file mode 100644 index 000000000..e4e0d260c Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel-08f9950d.o.tmp b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel-08f9950d.o.tmp new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel.go new file mode 100644 index 000000000..8c77958fb --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel.go @@ -0,0 +1,206 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package gpuevent + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfGpuKernelLaunchT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + KernFuncOff uint64 + GridX int32 + GridY int32 + GridZ int32 + BlockX int32 + BlockY int32 + BlockZ int32 + Stream uint64 + Args [16]uint64 + UstackSz uint64 + Ustack [128]uint64 +} + +type BpfGpuMallocT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +type BpfGpuMemcpyT struct { + _ structs.HostLayout + Flags uint8 + Kind uint8 + Pad [2]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + HandleCudaLaunch *ebpf.ProgramSpec `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.ProgramSpec `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.ProgramSpec `ebpf:"handle_cuda_memcpy"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + Rb *ebpf.MapSpec `ebpf:"rb"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + ProgCfg *ebpf.VariableSpec `ebpf:"prog_cfg"` + UnusedGpu *ebpf.VariableSpec `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.VariableSpec `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.VariableSpec `ebpf:"unused_gpu2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + PidCache *ebpf.Map `ebpf:"pid_cache"` + Rb *ebpf.Map `ebpf:"rb"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.PidCache, + m.Rb, + m.ValidPids, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + ProgCfg *ebpf.Variable `ebpf:"prog_cfg"` + UnusedGpu *ebpf.Variable `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.Variable `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.Variable `ebpf:"unused_gpu2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + HandleCudaLaunch *ebpf.Program `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.Program `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.Program `ebpf:"handle_cuda_memcpy"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.HandleCudaLaunch, + p.HandleCudaMalloc, + p.HandleCudaMemcpy, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel.o new file mode 100644 index 000000000..e4377ecf1 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpf_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_arm64_bpfel.go new file mode 100644 index 000000000..3c41b694a --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_arm64_bpfel.go @@ -0,0 +1,209 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package gpuevent + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugGpuKernelLaunchT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + KernFuncOff uint64 + GridX int32 + GridY int32 + GridZ int32 + BlockX int32 + BlockY int32 + BlockZ int32 + Stream uint64 + Args [16]uint64 + UstackSz uint64 + Ustack [128]uint64 +} + +type BpfDebugGpuMallocT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +type BpfDebugGpuMemcpyT struct { + _ structs.HostLayout + Flags uint8 + Kind uint8 + Pad [2]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + HandleCudaLaunch *ebpf.ProgramSpec `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.ProgramSpec `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.ProgramSpec `ebpf:"handle_cuda_memcpy"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + Rb *ebpf.MapSpec `ebpf:"rb"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + ProgCfg *ebpf.VariableSpec `ebpf:"prog_cfg"` + UnusedGpu *ebpf.VariableSpec `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.VariableSpec `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.VariableSpec `ebpf:"unused_gpu2"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + Rb *ebpf.Map `ebpf:"rb"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + m.PidCache, + m.Rb, + m.ValidPids, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + ProgCfg *ebpf.Variable `ebpf:"prog_cfg"` + UnusedGpu *ebpf.Variable `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.Variable `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.Variable `ebpf:"unused_gpu2"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + HandleCudaLaunch *ebpf.Program `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.Program `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.Program `ebpf:"handle_cuda_memcpy"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.HandleCudaLaunch, + p.HandleCudaMalloc, + p.HandleCudaMemcpy, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_arm64_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_arm64_bpfel.o new file mode 100644 index 000000000..6fc0d7b5d Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_x86_bpfel.go new file mode 100644 index 000000000..6b49cb665 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_x86_bpfel.go @@ -0,0 +1,209 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package gpuevent + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugGpuKernelLaunchT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + KernFuncOff uint64 + GridX int32 + GridY int32 + GridZ int32 + BlockX int32 + BlockY int32 + BlockZ int32 + Stream uint64 + Args [16]uint64 + UstackSz uint64 + Ustack [128]uint64 +} + +type BpfDebugGpuMallocT struct { + _ structs.HostLayout + Flags uint8 + Pad [3]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +type BpfDebugGpuMemcpyT struct { + _ structs.HostLayout + Flags uint8 + Kind uint8 + Pad [2]uint8 + PidInfo struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Size int64 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + HandleCudaLaunch *ebpf.ProgramSpec `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.ProgramSpec `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.ProgramSpec `ebpf:"handle_cuda_memcpy"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + Rb *ebpf.MapSpec `ebpf:"rb"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + ProgCfg *ebpf.VariableSpec `ebpf:"prog_cfg"` + UnusedGpu *ebpf.VariableSpec `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.VariableSpec `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.VariableSpec `ebpf:"unused_gpu2"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + Rb *ebpf.Map `ebpf:"rb"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + m.PidCache, + m.Rb, + m.ValidPids, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + ProgCfg *ebpf.Variable `ebpf:"prog_cfg"` + UnusedGpu *ebpf.Variable `ebpf:"unused_gpu"` + UnusedGpu1 *ebpf.Variable `ebpf:"unused_gpu1"` + UnusedGpu2 *ebpf.Variable `ebpf:"unused_gpu2"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + HandleCudaLaunch *ebpf.Program `ebpf:"handle_cuda_launch"` + HandleCudaMalloc *ebpf.Program `ebpf:"handle_cuda_malloc"` + HandleCudaMemcpy *ebpf.Program `ebpf:"handle_cuda_memcpy"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.HandleCudaLaunch, + p.HandleCudaMalloc, + p.HandleCudaMemcpy, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_x86_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_x86_bpfel.o new file mode 100644 index 000000000..08f74cdd0 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/gpuevent/bpfdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_arm64_bpfel.go new file mode 100644 index 000000000..d2cffe642 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_arm64_bpfel.go @@ -0,0 +1,140 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package logger + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugLogInfoT struct { + _ structs.HostLayout + Pid uint64 + Log [80]uint8 + Comm [20]uint8 + Pad [4]uint8 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + Unused100 *ebpf.VariableSpec `ebpf:"unused_100"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + Unused100 *ebpf.Variable `ebpf:"unused_100"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose() +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_arm64_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_arm64_bpfel.o new file mode 100644 index 000000000..25fb1b07f Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel-8fae181b.o.tmp b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel-8fae181b.o.tmp new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel.go new file mode 100644 index 000000000..00617a3e3 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel.go @@ -0,0 +1,140 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package logger + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugLogInfoT struct { + _ structs.HostLayout + Pid uint64 + Log [80]uint8 + Comm [20]uint8 + Pad [4]uint8 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + Unused100 *ebpf.VariableSpec `ebpf:"unused_100"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + Unused100 *ebpf.Variable `ebpf:"unused_100"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose() +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_x86_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel.o new file mode 100644 index 000000000..25fb1b07f Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/logger/bpfdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_arm64_bpfel.go new file mode 100644 index 000000000..941433242 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_arm64_bpfel.go @@ -0,0 +1,273 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package tctracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Pid uint32 +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiAppEgress *ebpf.ProgramSpec `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.ProgramSpec `ebpf:"obi_app_ingress"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + TraceMap *ebpf.Map `ebpf:"trace_map"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.IncomingTraceMap, + m.OngoingHttp, + m.OutgoingTraceMap, + m.SockDir, + m.TraceMap, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiAppEgress *ebpf.Program `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.Program `ebpf:"obi_app_ingress"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiAppEgress, + p.ObiAppIngress, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_arm64_bpfel.o new file mode 100644 index 000000000..501144efb Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel-c64afbf7.o.tmp b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel-c64afbf7.o.tmp new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel.go new file mode 100644 index 000000000..70b30c7f1 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel.go @@ -0,0 +1,273 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package tctracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Pid uint32 +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiAppEgress *ebpf.ProgramSpec `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.ProgramSpec `ebpf:"obi_app_ingress"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + TraceMap *ebpf.Map `ebpf:"trace_map"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.IncomingTraceMap, + m.OngoingHttp, + m.OutgoingTraceMap, + m.SockDir, + m.TraceMap, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiAppEgress *ebpf.Program `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.Program `ebpf:"obi_app_ingress"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiAppEgress, + p.ObiAppIngress, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel.o new file mode 100644 index 000000000..631b416a3 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpf_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_arm64_bpfel.go new file mode 100644 index 000000000..fb1f0f9c1 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_arm64_bpfel.go @@ -0,0 +1,276 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package tctracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfDebugHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfDebugHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Pid uint32 +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiAppEgress *ebpf.ProgramSpec `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.ProgramSpec `ebpf:"obi_app_ingress"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + TraceMap *ebpf.Map `ebpf:"trace_map"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.IncomingTraceMap, + m.OngoingHttp, + m.OutgoingTraceMap, + m.SockDir, + m.TraceMap, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiAppEgress *ebpf.Program `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.Program `ebpf:"obi_app_ingress"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiAppEgress, + p.ObiAppIngress, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_arm64_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_arm64_bpfel.o new file mode 100644 index 000000000..4001d5eb6 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_x86_bpfel.go new file mode 100644 index 000000000..15b4f59e6 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_x86_bpfel.go @@ -0,0 +1,276 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package tctracer + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugGoAddrKeyT struct { + _ structs.HostLayout + Pid uint64 + Addr uint64 +} + +type BpfDebugHttpFuncInvocationT struct { + _ structs.HostLayout + StartMonotimeNs uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } +} + +type BpfDebugHttpInfoT struct { + _ structs.HostLayout + Flags uint8 + Type uint8 + Ssl uint8 + Delayed uint8 + ConnInfo BpfDebugConnectionInfoT + StartMonotimeNs uint64 + EndMonotimeNs uint64 + ReqMonotimeNs uint64 + ExtraId uint64 + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid struct { + _ structs.HostLayout + HostPid uint32 + UserPid uint32 + Ns uint32 + } + Len uint32 + RespLen uint32 + TaskTid uint32 + Status uint16 + Buf [256]uint8 + HasLargeBuffers uint8 + Direction uint8 + Pad [4]uint8 +} + +type BpfDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Pid uint32 +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiAppEgress *ebpf.ProgramSpec `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.ProgramSpec `ebpf:"obi_app_ingress"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + GoOngoingHttp *ebpf.MapSpec `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.MapSpec `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` + GoOngoingHttp *ebpf.Map `ebpf:"go_ongoing_http"` + GoOngoingHttpClientRequests *ebpf.Map `ebpf:"go_ongoing_http_client_requests"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + TraceMap *ebpf.Map `ebpf:"trace_map"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + m.GoOngoingHttp, + m.GoOngoingHttpClientRequests, + m.IncomingTraceMap, + m.OngoingHttp, + m.OutgoingTraceMap, + m.SockDir, + m.TraceMap, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiAppEgress *ebpf.Program `ebpf:"obi_app_egress"` + ObiAppIngress *ebpf.Program `ebpf:"obi_app_ingress"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiAppEgress, + p.ObiAppIngress, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_x86_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_x86_bpfel.o new file mode 100644 index 000000000..1a3117f04 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tctracer/bpfdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_arm64_bpfel.go new file mode 100644 index 000000000..ca2d5d4f9 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_arm64_bpfel.go @@ -0,0 +1,350 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package tpinjector + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfFdInfoT struct { + _ structs.HostLayout + Pid BpfPidKeyT + Fd int32 + Type uint32 +} + +type BpfFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Pid uint32 +} + +type BpfPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfPidKeyT + Pad [4]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiPacketExtender *ebpf.ProgramSpec `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.ProgramSpec `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.ProgramSpec `ebpf:"obi_sockmap_tracker"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + EgressKeyMem *ebpf.MapSpec `ebpf:"egress_key_mem"` + Events *ebpf.MapSpec `ebpf:"events"` + ExtenderJumpTable *ebpf.MapSpec `ebpf:"extender_jump_table"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.MapSpec `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + EgressKeyMem *ebpf.Map `ebpf:"egress_key_mem"` + Events *ebpf.Map `ebpf:"events"` + ExtenderJumpTable *ebpf.Map `ebpf:"extender_jump_table"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.Map `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.CpSupportConnectInfo, + m.EgressKeyMem, + m.Events, + m.ExtenderJumpTable, + m.FdMap, + m.FdToConnection, + m.IncomingTraceMap, + m.MsgBuffers, + m.NginxUpstream, + m.NodejsFdMap, + m.OutgoingTraceMap, + m.PidCache, + m.PidConnectionInfoMem, + m.ServerTraces, + m.ServerTracesAux, + m.SockDir, + m.SslToConn, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.ValidPids, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiPacketExtender *ebpf.Program `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.Program `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.Program `ebpf:"obi_sockmap_tracker"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiPacketExtender, + p.ObiPacketExtenderWriteMsgTp, + p.ObiSockmapTracker, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_arm64_bpfel.o new file mode 100644 index 000000000..888e69c18 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel-94a9d368.o.tmp b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel-94a9d368.o.tmp new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel.go new file mode 100644 index 000000000..64535fb9e --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel.go @@ -0,0 +1,350 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package tpinjector + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfCpSupportDataT struct { + _ structs.HostLayout + T_key BpfTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfFdInfoT struct { + _ structs.HostLayout + Pid BpfPidKeyT + Fd int32 + Type uint32 +} + +type BpfFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Pid uint32 +} + +type BpfPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfPidKeyT + Pad [4]uint8 +} + +type BpfTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfConnectionInfoT + Type uint32 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiPacketExtender *ebpf.ProgramSpec `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.ProgramSpec `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.ProgramSpec `ebpf:"obi_sockmap_tracker"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + EgressKeyMem *ebpf.MapSpec `ebpf:"egress_key_mem"` + Events *ebpf.MapSpec `ebpf:"events"` + ExtenderJumpTable *ebpf.MapSpec `ebpf:"extender_jump_table"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.MapSpec `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + EgressKeyMem *ebpf.Map `ebpf:"egress_key_mem"` + Events *ebpf.Map `ebpf:"events"` + ExtenderJumpTable *ebpf.Map `ebpf:"extender_jump_table"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.Map `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.CpSupportConnectInfo, + m.EgressKeyMem, + m.Events, + m.ExtenderJumpTable, + m.FdMap, + m.FdToConnection, + m.IncomingTraceMap, + m.MsgBuffers, + m.NginxUpstream, + m.NodejsFdMap, + m.OutgoingTraceMap, + m.PidCache, + m.PidConnectionInfoMem, + m.ServerTraces, + m.ServerTracesAux, + m.SockDir, + m.SslToConn, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.ValidPids, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiPacketExtender *ebpf.Program `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.Program `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.Program `ebpf:"obi_sockmap_tracker"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiPacketExtender, + p.ObiPacketExtenderWriteMsgTp, + p.ObiSockmapTracker, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel.o new file mode 100644 index 000000000..be347d2fb Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpf_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_arm64_bpfel.go new file mode 100644 index 000000000..1675535d0 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_arm64_bpfel.go @@ -0,0 +1,353 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package tpinjector + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugCpSupportDataT struct { + _ structs.HostLayout + T_key BpfDebugTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugFdInfoT struct { + _ structs.HostLayout + Pid BpfDebugPidKeyT + Fd int32 + Type uint32 +} + +type BpfDebugFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfDebugMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Pid uint32 +} + +type BpfDebugPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfDebugSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfDebugSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfDebugPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfDebugPidKeyT + Pad [4]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiPacketExtender *ebpf.ProgramSpec `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.ProgramSpec `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.ProgramSpec `ebpf:"obi_sockmap_tracker"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + EgressKeyMem *ebpf.MapSpec `ebpf:"egress_key_mem"` + Events *ebpf.MapSpec `ebpf:"events"` + ExtenderJumpTable *ebpf.MapSpec `ebpf:"extender_jump_table"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.MapSpec `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + EgressKeyMem *ebpf.Map `ebpf:"egress_key_mem"` + Events *ebpf.Map `ebpf:"events"` + ExtenderJumpTable *ebpf.Map `ebpf:"extender_jump_table"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.Map `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.CpSupportConnectInfo, + m.DebugEvents, + m.EgressKeyMem, + m.Events, + m.ExtenderJumpTable, + m.FdMap, + m.FdToConnection, + m.IncomingTraceMap, + m.MsgBuffers, + m.NginxUpstream, + m.NodejsFdMap, + m.OutgoingTraceMap, + m.PidCache, + m.PidConnectionInfoMem, + m.ServerTraces, + m.ServerTracesAux, + m.SockDir, + m.SslToConn, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.ValidPids, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiPacketExtender *ebpf.Program `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.Program `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.Program `ebpf:"obi_sockmap_tracker"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiPacketExtender, + p.ObiPacketExtenderWriteMsgTp, + p.ObiSockmapTracker, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_arm64_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_arm64_bpfel.o new file mode 100644 index 000000000..2f22cbc59 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_x86_bpfel.go new file mode 100644 index 000000000..ed74a7afe --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_x86_bpfel.go @@ -0,0 +1,353 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package tpinjector + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugConnectionInfoPartT struct { + _ structs.HostLayout + Addr [16]uint8 + Pid uint32 + Port uint16 + Type uint8 + Pad uint8 +} + +type BpfDebugConnectionInfoT struct { + _ structs.HostLayout + S_addr [16]uint8 + D_addr [16]uint8 + S_port uint16 + D_port uint16 +} + +type BpfDebugCpSupportDataT struct { + _ structs.HostLayout + T_key BpfDebugTraceKeyT + Ts uint64 + RealClient uint8 + Established uint8 + Failed uint8 + Pad [5]uint8 +} + +type BpfDebugEgressKeyT struct { + _ structs.HostLayout + S_port uint16 + D_port uint16 +} + +type BpfDebugFdInfoT struct { + _ structs.HostLayout + Pid BpfDebugPidKeyT + Fd int32 + Type uint32 +} + +type BpfDebugFdKey struct { + _ structs.HostLayout + PidTgid uint64 + Fd int32 + Pad [4]uint8 +} + +type BpfDebugMsgBufferT struct { + _ structs.HostLayout + Buf [256]uint8 + Pos uint16 + RealSize uint16 +} + +type BpfDebugPidConnectionInfoT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Pid uint32 +} + +type BpfDebugPidKeyT struct { + _ structs.HostLayout + Tid uint32 + Pid uint32 + Ns uint32 +} + +type BpfDebugSslArgsT struct { + _ structs.HostLayout + Ssl uint64 + Buf uint64 + LenPtr uint64 + Flags uint64 +} + +type BpfDebugSslPidConnectionInfoT struct { + _ structs.HostLayout + P_conn BpfDebugPidConnectionInfoT + OrigDport uint16 + Pad [6]uint8 +} + +type BpfDebugTpInfoPidT struct { + _ structs.HostLayout + Tp struct { + _ structs.HostLayout + TraceId [16]uint8 + SpanId [8]uint8 + ParentId [8]uint8 + Ts uint64 + Flags uint8 + Pad [7]uint8 + } + Pid uint32 + Valid uint8 + Written uint8 + ReqType uint8 + Pad [1]uint8 +} + +type BpfDebugTraceKeyT struct { + _ structs.HostLayout + ExtraId uint64 + P_key BpfDebugPidKeyT + Pad [4]uint8 +} + +type BpfDebugTraceMapKeyT struct { + _ structs.HostLayout + Conn BpfDebugConnectionInfoT + Type uint32 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiPacketExtender *ebpf.ProgramSpec `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.ProgramSpec `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.ProgramSpec `ebpf:"obi_sockmap_tracker"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + ActiveSslConnections *ebpf.MapSpec `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.MapSpec `ebpf:"active_unix_socks"` + CloneMap *ebpf.MapSpec `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.MapSpec `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + EgressKeyMem *ebpf.MapSpec `ebpf:"egress_key_mem"` + Events *ebpf.MapSpec `ebpf:"events"` + ExtenderJumpTable *ebpf.MapSpec `ebpf:"extender_jump_table"` + FdMap *ebpf.MapSpec `ebpf:"fd_map"` + FdToConnection *ebpf.MapSpec `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.MapSpec `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.MapSpec `ebpf:"msg_buffers"` + NginxUpstream *ebpf.MapSpec `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.MapSpec `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.MapSpec `ebpf:"outgoing_trace_map"` + PidCache *ebpf.MapSpec `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.MapSpec `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` + ServerTracesAux *ebpf.MapSpec `ebpf:"server_traces_aux"` + SockDir *ebpf.MapSpec `ebpf:"sock_dir"` + SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` + TraceMap *ebpf.MapSpec `ebpf:"trace_map"` + ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + EXTEND_SIZE *ebpf.VariableSpec `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.VariableSpec `ebpf:"INVALID_POS"` + TP *ebpf.VariableSpec `ebpf:"TP"` + TP_PREFIX *ebpf.VariableSpec `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.VariableSpec `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.VariableSpec `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.VariableSpec `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.VariableSpec `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + ActiveSslConnections *ebpf.Map `ebpf:"active_ssl_connections"` + ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` + ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` + ActiveUnixSocks *ebpf.Map `ebpf:"active_unix_socks"` + CloneMap *ebpf.Map `ebpf:"clone_map"` + CpSupportConnectInfo *ebpf.Map `ebpf:"cp_support_connect_info"` + DebugEvents *ebpf.Map `ebpf:"debug_events"` + EgressKeyMem *ebpf.Map `ebpf:"egress_key_mem"` + Events *ebpf.Map `ebpf:"events"` + ExtenderJumpTable *ebpf.Map `ebpf:"extender_jump_table"` + FdMap *ebpf.Map `ebpf:"fd_map"` + FdToConnection *ebpf.Map `ebpf:"fd_to_connection"` + IncomingTraceMap *ebpf.Map `ebpf:"incoming_trace_map"` + MsgBuffers *ebpf.Map `ebpf:"msg_buffers"` + NginxUpstream *ebpf.Map `ebpf:"nginx_upstream"` + NodejsFdMap *ebpf.Map `ebpf:"nodejs_fd_map"` + OutgoingTraceMap *ebpf.Map `ebpf:"outgoing_trace_map"` + PidCache *ebpf.Map `ebpf:"pid_cache"` + PidConnectionInfoMem *ebpf.Map `ebpf:"pid_connection_info_mem"` + ServerTraces *ebpf.Map `ebpf:"server_traces"` + ServerTracesAux *ebpf.Map `ebpf:"server_traces_aux"` + SockDir *ebpf.Map `ebpf:"sock_dir"` + SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` + TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` + TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` + TraceMap *ebpf.Map `ebpf:"trace_map"` + ValidPids *ebpf.Map `ebpf:"valid_pids"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.ActiveSslConnections, + m.ActiveSslReadArgs, + m.ActiveSslWriteArgs, + m.ActiveUnixSocks, + m.CloneMap, + m.CpSupportConnectInfo, + m.DebugEvents, + m.EgressKeyMem, + m.Events, + m.ExtenderJumpTable, + m.FdMap, + m.FdToConnection, + m.IncomingTraceMap, + m.MsgBuffers, + m.NginxUpstream, + m.NodejsFdMap, + m.OutgoingTraceMap, + m.PidCache, + m.PidConnectionInfoMem, + m.ServerTraces, + m.ServerTracesAux, + m.SockDir, + m.SslToConn, + m.TpCharBufMem, + m.TpInfoMem, + m.TraceMap, + m.ValidPids, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + EXTEND_SIZE *ebpf.Variable `ebpf:"EXTEND_SIZE"` + INVALID_POS *ebpf.Variable `ebpf:"INVALID_POS"` + TP *ebpf.Variable `ebpf:"TP"` + TP_PREFIX *ebpf.Variable `ebpf:"TP_PREFIX"` + TP_PREFIX_SIZE *ebpf.Variable `ebpf:"TP_PREFIX_SIZE"` + DisableBlackBoxCp *ebpf.Variable `ebpf:"disable_black_box_cp"` + FilterPids *ebpf.Variable `ebpf:"filter_pids"` + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` + WakeupDataBytes *ebpf.Variable `ebpf:"wakeup_data_bytes"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiPacketExtender *ebpf.Program `ebpf:"obi_packet_extender"` + ObiPacketExtenderWriteMsgTp *ebpf.Program `ebpf:"obi_packet_extender_write_msg_tp"` + ObiSockmapTracker *ebpf.Program `ebpf:"obi_sockmap_tracker"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiPacketExtender, + p.ObiPacketExtenderWriteMsgTp, + p.ObiSockmapTracker, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_x86_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_x86_bpfel.o new file mode 100644 index 000000000..065d82ef4 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/tpinjector/bpfdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.go new file mode 100644 index 000000000..07da66237 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.go @@ -0,0 +1,148 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package watcher + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfWatchInfoT struct { + _ structs.HostLayout + Flags uint64 + Payload uint64 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiKprobeSysBind *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_bind"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + Unused2 *ebpf.VariableSpec `ebpf:"unused_2"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + WatchEvents *ebpf.Map `ebpf:"watch_events"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.WatchEvents, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + Unused2 *ebpf.Variable `ebpf:"unused_2"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiKprobeSysBind *ebpf.Program `ebpf:"obi_kprobe_sys_bind"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiKprobeSysBind, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o new file mode 100644 index 000000000..77566ed00 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel-37bb1911.o.tmp b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel-37bb1911.o.tmp new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel.go new file mode 100644 index 000000000..a50c81048 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel.go @@ -0,0 +1,148 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package watcher + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfWatchInfoT struct { + _ structs.HostLayout + Flags uint64 + Payload uint64 +} + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + ObiKprobeSysBind *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_bind"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + Unused2 *ebpf.VariableSpec `ebpf:"unused_2"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + WatchEvents *ebpf.Map `ebpf:"watch_events"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.WatchEvents, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + Unused2 *ebpf.Variable `ebpf:"unused_2"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + ObiKprobeSysBind *ebpf.Program `ebpf:"obi_kprobe_sys_bind"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.ObiKprobeSysBind, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel.o new file mode 100644 index 000000000..821e41509 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpf_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_arm64_bpfel.go new file mode 100644 index 000000000..7d1c4e48b --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_arm64_bpfel.go @@ -0,0 +1,151 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package watcher + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugWatchInfoT struct { + _ structs.HostLayout + Flags uint64 + Payload uint64 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiKprobeSysBind *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_bind"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + Unused2 *ebpf.VariableSpec `ebpf:"unused_2"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` + WatchEvents *ebpf.Map `ebpf:"watch_events"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + m.WatchEvents, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + Unused2 *ebpf.Variable `ebpf:"unused_2"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiKprobeSysBind *ebpf.Program `ebpf:"obi_kprobe_sys_bind"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiKprobeSysBind, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_arm64_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_arm64_bpfel.o new file mode 100644 index 000000000..e1e588825 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_x86_bpfel.go new file mode 100644 index 000000000..66c4b313a --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_x86_bpfel.go @@ -0,0 +1,151 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package watcher + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type BpfDebugWatchInfoT struct { + _ structs.HostLayout + Flags uint64 + Payload uint64 +} + +// LoadBpfDebug returns the embedded CollectionSpec for BpfDebug. +func LoadBpfDebug() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfDebugBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load BpfDebug: %w", err) + } + + return spec, err +} + +// LoadBpfDebugObjects loads BpfDebug and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfDebugObjects +// *BpfDebugPrograms +// *BpfDebugMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfDebugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpfDebug() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfDebugSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugSpecs struct { + BpfDebugProgramSpecs + BpfDebugMapSpecs + BpfDebugVariableSpecs +} + +// BpfDebugProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugProgramSpecs struct { + ObiKprobeSysBind *ebpf.ProgramSpec `ebpf:"obi_kprobe_sys_bind"` +} + +// BpfDebugMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugMapSpecs struct { + DebugEvents *ebpf.MapSpec `ebpf:"debug_events"` + WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` +} + +// BpfDebugVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfDebugVariableSpecs struct { + Ip4ip6Prefix *ebpf.VariableSpec `ebpf:"ip4ip6_prefix"` + Unused *ebpf.VariableSpec `ebpf:"unused"` + Unused2 *ebpf.VariableSpec `ebpf:"unused_2"` + UnusedHttp2 *ebpf.VariableSpec `ebpf:"unused_http2"` +} + +// BpfDebugObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugObjects struct { + BpfDebugPrograms + BpfDebugMaps + BpfDebugVariables +} + +func (o *BpfDebugObjects) Close() error { + return _BpfDebugClose( + &o.BpfDebugPrograms, + &o.BpfDebugMaps, + ) +} + +// BpfDebugMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugMaps struct { + DebugEvents *ebpf.Map `ebpf:"debug_events"` + WatchEvents *ebpf.Map `ebpf:"watch_events"` +} + +func (m *BpfDebugMaps) Close() error { + return _BpfDebugClose( + m.DebugEvents, + m.WatchEvents, + ) +} + +// BpfDebugVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugVariables struct { + Ip4ip6Prefix *ebpf.Variable `ebpf:"ip4ip6_prefix"` + Unused *ebpf.Variable `ebpf:"unused"` + Unused2 *ebpf.Variable `ebpf:"unused_2"` + UnusedHttp2 *ebpf.Variable `ebpf:"unused_http2"` +} + +// BpfDebugPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfDebugObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfDebugPrograms struct { + ObiKprobeSysBind *ebpf.Program `ebpf:"obi_kprobe_sys_bind"` +} + +func (p *BpfDebugPrograms) Close() error { + return _BpfDebugClose( + p.ObiKprobeSysBind, + ) +} + +func _BpfDebugClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpfdebug_x86_bpfel.o +var _BpfDebugBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_x86_bpfel.o new file mode 100644 index 000000000..0ee079f9a Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/ebpf/watcher/bpfdebug_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_arm64_bpfel.go new file mode 100644 index 000000000..3bbc21fb4 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_arm64_bpfel.go @@ -0,0 +1,226 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package ebpf + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type NetConnInitiatorKey struct { + _ structs.HostLayout + LowIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + HighIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + LowIpPort uint16 + HighIpPort uint16 +} + +type NetFlowId NetFlowIdT + +type NetFlowIdT struct { + _ structs.HostLayout + SrcIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + DstIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + IfIndex uint32 + EthProtocol uint16 + SrcPort uint16 + DstPort uint16 + TransportProtocol uint8 + Pad [1]uint8 +} + +type NetFlowMetrics NetFlowMetricsT + +type NetFlowMetricsT struct { + _ structs.HostLayout + Bytes uint64 + StartMonoTimeNs uint64 + EndMonoTimeNs uint64 + Packets uint32 + Flags uint16 + IfaceDirection uint8 + Initiator uint8 + Errno uint8 + Pad [7]uint8 +} + +type NetFlowRecordT struct { + _ structs.HostLayout + Metrics NetFlowMetrics + Id NetFlowId + Pad [4]uint8 +} + +// LoadNet returns the embedded CollectionSpec for Net. +func LoadNet() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_NetBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Net: %w", err) + } + + return spec, err +} + +// LoadNetObjects loads Net and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *NetObjects +// *NetPrograms +// *NetMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadNetObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadNet() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// NetSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSpecs struct { + NetProgramSpecs + NetMapSpecs + NetVariableSpecs +} + +// NetProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetProgramSpecs struct { + ObiEgressFlowParse *ebpf.ProgramSpec `ebpf:"obi_egress_flow_parse"` + ObiIngressFlowParse *ebpf.ProgramSpec `ebpf:"obi_ingress_flow_parse"` +} + +// NetMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetMapSpecs struct { + AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` + DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` + FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` +} + +// NetVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetVariableSpecs struct { + Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` + Sampling *ebpf.VariableSpec `ebpf:"sampling"` + TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` + UnusedFlowId *ebpf.VariableSpec `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.VariableSpec `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.VariableSpec `ebpf:"unused_flow_record"` +} + +// NetObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetObjects struct { + NetPrograms + NetMaps + NetVariables +} + +func (o *NetObjects) Close() error { + return _NetClose( + &o.NetPrograms, + &o.NetMaps, + ) +} + +// NetMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetMaps struct { + AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` + DirectFlows *ebpf.Map `ebpf:"direct_flows"` + FlowDirections *ebpf.Map `ebpf:"flow_directions"` +} + +func (m *NetMaps) Close() error { + return _NetClose( + m.AggregatedFlows, + m.ConnInitiators, + m.DirectFlows, + m.FlowDirections, + ) +} + +// NetVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetVariables struct { + Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` + Sampling *ebpf.Variable `ebpf:"sampling"` + TraceMessages *ebpf.Variable `ebpf:"trace_messages"` + UnusedFlowId *ebpf.Variable `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.Variable `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.Variable `ebpf:"unused_flow_record"` +} + +// NetPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetPrograms struct { + ObiEgressFlowParse *ebpf.Program `ebpf:"obi_egress_flow_parse"` + ObiIngressFlowParse *ebpf.Program `ebpf:"obi_ingress_flow_parse"` +} + +func (p *NetPrograms) Close() error { + return _NetClose( + p.ObiEgressFlowParse, + p.ObiIngressFlowParse, + ) +} + +func _NetClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed net_arm64_bpfel.o +var _NetBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_arm64_bpfel.o new file mode 100644 index 000000000..0fd65808e Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_x86_bpfel.go new file mode 100644 index 000000000..bba5b8976 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_x86_bpfel.go @@ -0,0 +1,226 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package ebpf + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type NetConnInitiatorKey struct { + _ structs.HostLayout + LowIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + HighIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + LowIpPort uint16 + HighIpPort uint16 +} + +type NetFlowId NetFlowIdT + +type NetFlowIdT struct { + _ structs.HostLayout + SrcIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + DstIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + IfIndex uint32 + EthProtocol uint16 + SrcPort uint16 + DstPort uint16 + TransportProtocol uint8 + Pad [1]uint8 +} + +type NetFlowMetrics NetFlowMetricsT + +type NetFlowMetricsT struct { + _ structs.HostLayout + Bytes uint64 + StartMonoTimeNs uint64 + EndMonoTimeNs uint64 + Packets uint32 + Flags uint16 + IfaceDirection uint8 + Initiator uint8 + Errno uint8 + Pad [7]uint8 +} + +type NetFlowRecordT struct { + _ structs.HostLayout + Metrics NetFlowMetrics + Id NetFlowId + Pad [4]uint8 +} + +// LoadNet returns the embedded CollectionSpec for Net. +func LoadNet() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_NetBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Net: %w", err) + } + + return spec, err +} + +// LoadNetObjects loads Net and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *NetObjects +// *NetPrograms +// *NetMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadNetObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadNet() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// NetSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSpecs struct { + NetProgramSpecs + NetMapSpecs + NetVariableSpecs +} + +// NetProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetProgramSpecs struct { + ObiEgressFlowParse *ebpf.ProgramSpec `ebpf:"obi_egress_flow_parse"` + ObiIngressFlowParse *ebpf.ProgramSpec `ebpf:"obi_ingress_flow_parse"` +} + +// NetMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetMapSpecs struct { + AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` + DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` + FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` +} + +// NetVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetVariableSpecs struct { + Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` + Sampling *ebpf.VariableSpec `ebpf:"sampling"` + TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` + UnusedFlowId *ebpf.VariableSpec `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.VariableSpec `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.VariableSpec `ebpf:"unused_flow_record"` +} + +// NetObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetObjects struct { + NetPrograms + NetMaps + NetVariables +} + +func (o *NetObjects) Close() error { + return _NetClose( + &o.NetPrograms, + &o.NetMaps, + ) +} + +// NetMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetMaps struct { + AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` + DirectFlows *ebpf.Map `ebpf:"direct_flows"` + FlowDirections *ebpf.Map `ebpf:"flow_directions"` +} + +func (m *NetMaps) Close() error { + return _NetClose( + m.AggregatedFlows, + m.ConnInitiators, + m.DirectFlows, + m.FlowDirections, + ) +} + +// NetVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetVariables struct { + Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` + Sampling *ebpf.Variable `ebpf:"sampling"` + TraceMessages *ebpf.Variable `ebpf:"trace_messages"` + UnusedFlowId *ebpf.Variable `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.Variable `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.Variable `ebpf:"unused_flow_record"` +} + +// NetPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetPrograms struct { + ObiEgressFlowParse *ebpf.Program `ebpf:"obi_egress_flow_parse"` + ObiIngressFlowParse *ebpf.Program `ebpf:"obi_ingress_flow_parse"` +} + +func (p *NetPrograms) Close() error { + return _NetClose( + p.ObiEgressFlowParse, + p.ObiIngressFlowParse, + ) +} + +func _NetClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed net_x86_bpfel.o +var _NetBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_x86_bpfel.o new file mode 100644 index 000000000..43c78db86 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/net_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.go new file mode 100644 index 000000000..f9af8a3d9 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.go @@ -0,0 +1,223 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package ebpf + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type NetSkConnInitiatorKey struct { + _ structs.HostLayout + LowIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + HighIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + LowIpPort uint16 + HighIpPort uint16 +} + +type NetSkFlowId NetSkFlowIdT + +type NetSkFlowIdT struct { + _ structs.HostLayout + SrcIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + DstIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + IfIndex uint32 + EthProtocol uint16 + SrcPort uint16 + DstPort uint16 + TransportProtocol uint8 + Pad [1]uint8 +} + +type NetSkFlowMetrics NetSkFlowMetricsT + +type NetSkFlowMetricsT struct { + _ structs.HostLayout + Bytes uint64 + StartMonoTimeNs uint64 + EndMonoTimeNs uint64 + Packets uint32 + Flags uint16 + IfaceDirection uint8 + Initiator uint8 + Errno uint8 + Pad [7]uint8 +} + +type NetSkFlowRecordT struct { + _ structs.HostLayout + Metrics NetSkFlowMetrics + Id NetSkFlowId + Pad [4]uint8 +} + +// LoadNetSk returns the embedded CollectionSpec for NetSk. +func LoadNetSk() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_NetSkBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load NetSk: %w", err) + } + + return spec, err +} + +// LoadNetSkObjects loads NetSk and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *NetSkObjects +// *NetSkPrograms +// *NetSkMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadNetSkObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadNetSk() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// NetSkSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkSpecs struct { + NetSkProgramSpecs + NetSkMapSpecs + NetSkVariableSpecs +} + +// NetSkProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkProgramSpecs struct { + ObiSocketFilter *ebpf.ProgramSpec `ebpf:"obi_socket__filter"` +} + +// NetSkMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkMapSpecs struct { + AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` + DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` + FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` +} + +// NetSkVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkVariableSpecs struct { + Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` + Sampling *ebpf.VariableSpec `ebpf:"sampling"` + TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` + UnusedFlowId *ebpf.VariableSpec `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.VariableSpec `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.VariableSpec `ebpf:"unused_flow_record"` +} + +// NetSkObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkObjects struct { + NetSkPrograms + NetSkMaps + NetSkVariables +} + +func (o *NetSkObjects) Close() error { + return _NetSkClose( + &o.NetSkPrograms, + &o.NetSkMaps, + ) +} + +// NetSkMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkMaps struct { + AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` + DirectFlows *ebpf.Map `ebpf:"direct_flows"` + FlowDirections *ebpf.Map `ebpf:"flow_directions"` +} + +func (m *NetSkMaps) Close() error { + return _NetSkClose( + m.AggregatedFlows, + m.ConnInitiators, + m.DirectFlows, + m.FlowDirections, + ) +} + +// NetSkVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkVariables struct { + Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` + Sampling *ebpf.Variable `ebpf:"sampling"` + TraceMessages *ebpf.Variable `ebpf:"trace_messages"` + UnusedFlowId *ebpf.Variable `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.Variable `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.Variable `ebpf:"unused_flow_record"` +} + +// NetSkPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkPrograms struct { + ObiSocketFilter *ebpf.Program `ebpf:"obi_socket__filter"` +} + +func (p *NetSkPrograms) Close() error { + return _NetSkClose( + p.ObiSocketFilter, + ) +} + +func _NetSkClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed netsk_arm64_bpfel.o +var _NetSkBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o new file mode 100644 index 000000000..b3df64c6a Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_x86_bpfel.go new file mode 100644 index 000000000..7c191a109 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_x86_bpfel.go @@ -0,0 +1,223 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package ebpf + +import ( + "bytes" + _ "embed" + "fmt" + "io" + "structs" + + "github.com/cilium/ebpf" +) + +type NetSkConnInitiatorKey struct { + _ structs.HostLayout + LowIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + HighIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + LowIpPort uint16 + HighIpPort uint16 +} + +type NetSkFlowId NetSkFlowIdT + +type NetSkFlowIdT struct { + _ structs.HostLayout + SrcIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + DstIp struct { + _ structs.HostLayout + In6U struct { + _ structs.HostLayout + U6Addr8 [16]uint8 + } + } + IfIndex uint32 + EthProtocol uint16 + SrcPort uint16 + DstPort uint16 + TransportProtocol uint8 + Pad [1]uint8 +} + +type NetSkFlowMetrics NetSkFlowMetricsT + +type NetSkFlowMetricsT struct { + _ structs.HostLayout + Bytes uint64 + StartMonoTimeNs uint64 + EndMonoTimeNs uint64 + Packets uint32 + Flags uint16 + IfaceDirection uint8 + Initiator uint8 + Errno uint8 + Pad [7]uint8 +} + +type NetSkFlowRecordT struct { + _ structs.HostLayout + Metrics NetSkFlowMetrics + Id NetSkFlowId + Pad [4]uint8 +} + +// LoadNetSk returns the embedded CollectionSpec for NetSk. +func LoadNetSk() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_NetSkBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load NetSk: %w", err) + } + + return spec, err +} + +// LoadNetSkObjects loads NetSk and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *NetSkObjects +// *NetSkPrograms +// *NetSkMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadNetSkObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadNetSk() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// NetSkSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkSpecs struct { + NetSkProgramSpecs + NetSkMapSpecs + NetSkVariableSpecs +} + +// NetSkProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkProgramSpecs struct { + ObiSocketFilter *ebpf.ProgramSpec `ebpf:"obi_socket__filter"` +} + +// NetSkMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkMapSpecs struct { + AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` + DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` + FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` +} + +// NetSkVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type NetSkVariableSpecs struct { + Ip4in6 *ebpf.VariableSpec `ebpf:"ip4in6"` + Sampling *ebpf.VariableSpec `ebpf:"sampling"` + TraceMessages *ebpf.VariableSpec `ebpf:"trace_messages"` + UnusedFlowId *ebpf.VariableSpec `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.VariableSpec `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.VariableSpec `ebpf:"unused_flow_record"` +} + +// NetSkObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkObjects struct { + NetSkPrograms + NetSkMaps + NetSkVariables +} + +func (o *NetSkObjects) Close() error { + return _NetSkClose( + &o.NetSkPrograms, + &o.NetSkMaps, + ) +} + +// NetSkMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkMaps struct { + AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` + DirectFlows *ebpf.Map `ebpf:"direct_flows"` + FlowDirections *ebpf.Map `ebpf:"flow_directions"` +} + +func (m *NetSkMaps) Close() error { + return _NetSkClose( + m.AggregatedFlows, + m.ConnInitiators, + m.DirectFlows, + m.FlowDirections, + ) +} + +// NetSkVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkVariables struct { + Ip4in6 *ebpf.Variable `ebpf:"ip4in6"` + Sampling *ebpf.Variable `ebpf:"sampling"` + TraceMessages *ebpf.Variable `ebpf:"trace_messages"` + UnusedFlowId *ebpf.Variable `ebpf:"unused_flow_id"` + UnusedFlowMetrics *ebpf.Variable `ebpf:"unused_flow_metrics"` + UnusedFlowRecord *ebpf.Variable `ebpf:"unused_flow_record"` +} + +// NetSkPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. +type NetSkPrograms struct { + ObiSocketFilter *ebpf.Program `ebpf:"obi_socket__filter"` +} + +func (p *NetSkPrograms) Close() error { + return _NetSkClose( + p.ObiSocketFilter, + ) +} + +func _NetSkClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed netsk_x86_bpfel.o +var _NetSkBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_x86_bpfel.o new file mode 100644 index 000000000..ad412c9fb Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/netolly/ebpf/netsk_x86_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/otelsdk/grafana-opentelemetry-java.jar b/vendor/go.opentelemetry.io/obi/pkg/internal/otelsdk/grafana-opentelemetry-java.jar new file mode 100644 index 000000000..cf32da2fe Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/otelsdk/grafana-opentelemetry-java.jar differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_arm64_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_arm64_bpfel.go new file mode 100644 index 000000000..8b71ef81c --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_arm64_bpfel.go @@ -0,0 +1,133 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build arm64 + +package xdp + +import ( + "bytes" + _ "embed" + "fmt" + "io" + + "github.com/cilium/ebpf" +) + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + DnsResponseTracker *ebpf.ProgramSpec `ebpf:"dns_response_tracker"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + RingBuffer *ebpf.MapSpec `ebpf:"ring_buffer"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + RingBuffer *ebpf.Map `ebpf:"ring_buffer"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.RingBuffer, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + DnsResponseTracker *ebpf.Program `ebpf:"dns_response_tracker"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.DnsResponseTracker, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_arm64_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_arm64_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_arm64_bpfel.o new file mode 100644 index 000000000..ec1caf359 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_arm64_bpfel.o differ diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_x86_bpfel.go b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_x86_bpfel.go new file mode 100644 index 000000000..f4d80a331 --- /dev/null +++ b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_x86_bpfel.go @@ -0,0 +1,133 @@ +// Code generated by bpf2go; DO NOT EDIT. +//go:build 386 || amd64 + +package xdp + +import ( + "bytes" + _ "embed" + "fmt" + "io" + + "github.com/cilium/ebpf" +) + +// LoadBpf returns the embedded CollectionSpec for Bpf. +func LoadBpf() (*ebpf.CollectionSpec, error) { + reader := bytes.NewReader(_BpfBytes) + spec, err := ebpf.LoadCollectionSpecFromReader(reader) + if err != nil { + return nil, fmt.Errorf("can't load Bpf: %w", err) + } + + return spec, err +} + +// LoadBpfObjects loads Bpf and converts it into a struct. +// +// The following types are suitable as obj argument: +// +// *BpfObjects +// *BpfPrograms +// *BpfMaps +// +// See ebpf.CollectionSpec.LoadAndAssign documentation for details. +func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { + spec, err := LoadBpf() + if err != nil { + return err + } + + return spec.LoadAndAssign(obj, opts) +} + +// BpfSpecs contains maps and programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfSpecs struct { + BpfProgramSpecs + BpfMapSpecs + BpfVariableSpecs +} + +// BpfProgramSpecs contains programs before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfProgramSpecs struct { + DnsResponseTracker *ebpf.ProgramSpec `ebpf:"dns_response_tracker"` +} + +// BpfMapSpecs contains maps before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfMapSpecs struct { + RingBuffer *ebpf.MapSpec `ebpf:"ring_buffer"` +} + +// BpfVariableSpecs contains global variables before they are loaded into the kernel. +// +// It can be passed ebpf.CollectionSpec.Assign. +type BpfVariableSpecs struct { +} + +// BpfObjects contains all objects after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfObjects struct { + BpfPrograms + BpfMaps + BpfVariables +} + +func (o *BpfObjects) Close() error { + return _BpfClose( + &o.BpfPrograms, + &o.BpfMaps, + ) +} + +// BpfMaps contains all maps after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfMaps struct { + RingBuffer *ebpf.Map `ebpf:"ring_buffer"` +} + +func (m *BpfMaps) Close() error { + return _BpfClose( + m.RingBuffer, + ) +} + +// BpfVariables contains all global variables after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfVariables struct { +} + +// BpfPrograms contains all programs after they have been loaded into the kernel. +// +// It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. +type BpfPrograms struct { + DnsResponseTracker *ebpf.Program `ebpf:"dns_response_tracker"` +} + +func (p *BpfPrograms) Close() error { + return _BpfClose( + p.DnsResponseTracker, + ) +} + +func _BpfClose(closers ...io.Closer) error { + for _, closer := range closers { + if err := closer.Close(); err != nil { + return err + } + } + return nil +} + +// Do not access this directly. +// +//go:embed bpf_x86_bpfel.o +var _BpfBytes []byte diff --git a/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_x86_bpfel.o b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_x86_bpfel.o new file mode 100644 index 000000000..159ceb924 Binary files /dev/null and b/vendor/go.opentelemetry.io/obi/pkg/internal/rdns/ebpf/xdp/bpf_x86_bpfel.o differ diff --git a/vendor/modules.txt b/vendor/modules.txt index b1deffeb2..4bee42673 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -774,7 +774,7 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/inte go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv -# go.opentelemetry.io/obi v0.0.0-20251013143511-10fd81bc8389 => ./.obi-src +# go.opentelemetry.io/obi v0.0.0-20251023073643-d71d07a6a4d2 => ./.obi-src ## explicit; go 1.25.0 go.opentelemetry.io/obi/pkg/app/request go.opentelemetry.io/obi/pkg/buildinfo