Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SQL detection #1427

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test fixes
  • Loading branch information
grcevski committed Dec 3, 2024
commit ac119b94b1682f4b9dfb929ed713984e7c2bbb5c
4 changes: 0 additions & 4 deletions pkg/internal/ebpf/common/tcp_detect_transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package ebpfcommon
import (
"bytes"
"encoding/binary"
"fmt"

"github.com/cilium/ebpf/ringbuf"

Expand Down Expand Up @@ -36,9 +35,6 @@ func ReadTCPRequestIntoSpan(cfg *config.EPPFTracer, record *ringbuf.Record, filt

b := event.Buf[:l]

fmt.Printf("b: %v\n", b)
fmt.Printf("rb: %v\n", event.Rbuf[:rl])

// Check if we have a SQL statement
op, table, sql, kind := detectSQLPayload(cfg.HeuristicSQLDetect, b)
if validSQL(op, table) {
Expand Down
1 change: 1 addition & 0 deletions test/oats/kafka/yaml/oats_python_kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ expected:
- traceql: '{ .messaging.operation.type = "process" }'
spans:
- name: 'my-topic process'
allow-duplicates: true
attributes:
messaging.destination.name: my-topic
messaging.operation.type: process
Expand Down
Loading