|
@@ -3,6 +3,11 @@ package tracing
|
|
|
import (
|
|
import (
|
|
|
"context"
|
|
"context"
|
|
|
"fmt"
|
|
"fmt"
|
|
|
|
|
+ "strconv"
|
|
|
|
|
+ "strings"
|
|
|
|
|
+ "sync/atomic"
|
|
|
|
|
+ "time"
|
|
|
|
|
+
|
|
|
"github.com/coroot/coroot-node-agent/ebpftracer"
|
|
"github.com/coroot/coroot-node-agent/ebpftracer"
|
|
|
"github.com/coroot/coroot-node-agent/ebpftracer/l7"
|
|
"github.com/coroot/coroot-node-agent/ebpftracer/l7"
|
|
|
"github.com/coroot/coroot-node-agent/utils"
|
|
"github.com/coroot/coroot-node-agent/utils"
|
|
@@ -13,10 +18,6 @@ import (
|
|
|
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
|
|
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
|
|
|
"go.opentelemetry.io/otel/trace"
|
|
"go.opentelemetry.io/otel/trace"
|
|
|
"inet.af/netaddr"
|
|
"inet.af/netaddr"
|
|
|
- "strconv"
|
|
|
|
|
- "strings"
|
|
|
|
|
- "sync/atomic"
|
|
|
|
|
- "time"
|
|
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -319,7 +320,7 @@ func isCURDOperation(q string) bool {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
q = strings.ToUpper(q[:6])
|
|
q = strings.ToUpper(q[:6])
|
|
|
- return q == "SELECT" || q == "INSERT" || q == "UPDATE" || q == "DELETE"
|
|
|
|
|
|
|
+ return q == "SELECT" || q == "INSERT" || q == "UPDATE" || q == "DELETE" || q == "PREPAR"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (t *Trace) SQLTraceQueryEvent(l7Type l7.Protocol, semconvVal attribute.KeyValue, query string, r *l7.RequestData, destination netaddr.IPPort) {
|
|
func (t *Trace) SQLTraceQueryEvent(l7Type l7.Protocol, semconvVal attribute.KeyValue, query string, r *l7.RequestData, destination netaddr.IPPort) {
|