Skip to content

Commit

Permalink
Merge pull request #171 from getanteon/refactor/dist-tracing-passive
Browse files Browse the repository at this point in the history
make dist tracing disabled by default temporarily
  • Loading branch information
fatihbaltaci authored Aug 5, 2024
2 parents d78e290 + 9cba7f3 commit 0003098
Show file tree
Hide file tree
Showing 13 changed files with 275 additions and 258 deletions.
43 changes: 25 additions & 18 deletions aggregator/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,13 @@ func (a *Aggregator) processEbpf(ctx context.Context) {
ctxPid := context.WithValue(a.ctx, log.LOG_CONTEXT, fmt.Sprint(d.Pid))
go a.signalTlsAttachment(d.Pid)
a.processL7(ctxPid, d)
case l7_req.TRACE_EVENT:
d := data.(*l7_req.TraceEvent)
rateLimiter := a.getRateLimiterForPid(d.Pid)
if rateLimiter.Allow() {
a.ds.PersistTraceEvent(d)
}
// dist tracing disabled by default temporarily
// case l7_req.TRACE_EVENT:
// d := data.(*l7_req.TraceEvent)
// rateLimiter := a.getRateLimiterForPid(d.Pid)
// if rateLimiter.Allow() {
// a.ds.PersistTraceEvent(d)
// }
}
}
}
Expand Down Expand Up @@ -1050,8 +1051,9 @@ func (a *Aggregator) processKafkaEvent(ctx context.Context, d *l7_req.L7Event) {
Key: msg.Key,
Value: msg.Value,
Type: msg.Type,
Tid: d.Tid,
Seq: d.Seq,
// dist tracing disabled by default temporarily
// Tid: d.Tid,
// Seq: d.Seq,
}

err := a.setFromToV2(addrPair, d, event, "")
Expand Down Expand Up @@ -1084,8 +1086,9 @@ func (a *Aggregator) processAmqpEvent(ctx context.Context, d *l7_req.L7Event) {
FailReason: "",
Method: d.Method,
Path: "",
Tid: d.Tid,
Seq: d.Seq,
// dist tracing disabled by default temporarily
// Tid: d.Tid,
// Seq: d.Seq,
}

err := a.setFromToV2(addrPair, d, reqDto, "")
Expand Down Expand Up @@ -1124,8 +1127,9 @@ func (a *Aggregator) processRedisEvent(ctx context.Context, d *l7_req.L7Event) {
FailReason: "",
Method: d.Method,
Path: query,
Tid: d.Tid,
Seq: d.Seq,
// dist tracing disabled by default temporarily
// Tid: d.Tid,
// Seq: d.Seq,
}

err := a.setFromToV2(addrPair, d, reqDto, "")
Expand Down Expand Up @@ -1216,8 +1220,9 @@ func (a *Aggregator) processHttpEvent(ctx context.Context, d *l7_req.L7Event) {
FailReason: "",
Method: d.Method,
Path: path,
Tid: d.Tid,
Seq: d.Seq,
// dist tracing disabled by default temporarily
// Tid: d.Tid,
// Seq: d.Seq,
}

err := a.setFromToV2(addrPair, d, reqDto, reqHostHeader)
Expand Down Expand Up @@ -1256,8 +1261,9 @@ func (a *Aggregator) processMySQLEvent(ctx context.Context, d *l7_req.L7Event) {
FailReason: "",
Method: d.Method,
Path: query,
Tid: d.Tid,
Seq: d.Seq,
// dist tracing disabled by default temporarily
// Tid: d.Tid,
// Seq: d.Seq,
}

err = a.setFromToV2(addrPair, d, reqDto, "")
Expand Down Expand Up @@ -1297,8 +1303,9 @@ func (a *Aggregator) processPostgresEvent(ctx context.Context, d *l7_req.L7Event
FailReason: "",
Method: d.Method,
Path: query,
Tid: d.Tid,
Seq: d.Seq,
// dist tracing disabled by default temporarily
// Tid: d.Tid,
// Seq: d.Seq,
}

err = a.setFromToV2(addrPair, d, reqDto, "")
Expand Down
Loading

0 comments on commit 0003098

Please sign in to comment.