Skip to content

Commit

Permalink
fix: debug issue with specific email
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain committed Jan 7, 2025
1 parent a9b7c29 commit c76d27a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exporter/clickhousetracesexporter/clickhouse_exporter_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ func newStructuredSpanV3(bucketStart uint64, fingerprint string, otelSpan ptrace

})

// debugging purpose
if v, ok := attrMap.StringMap["task.user_email"]; ok && v == "[email protected]" {
zap.S().Error("found trace for task.user_email", zap.String("task.user_email", v), zap.String("traceID", otelSpan.TraceID().String()), zap.String("spanID", otelSpan.SpanID().String()))
}

resource.Attributes().Range(func(k string, v pcommon.Value) bool {
if v.Type() == pcommon.ValueTypeMap {
result := flatten.FlattenJSON(v.Map().AsRaw(), k)
Expand Down
3 changes: 3 additions & 0 deletions exporter/clickhousetracesexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"go.opentelemetry.io/collector/config/configretry"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.uber.org/zap"
)

const (
Expand Down Expand Up @@ -64,6 +65,8 @@ func createTracesExporter(
return nil, err
}

zap.ReplaceGlobals(params.Logger)

return exporterhelper.NewTracesExporter(
ctx,
params,
Expand Down

0 comments on commit c76d27a

Please sign in to comment.