Skip to content

Commit

Permalink
Merge branch 'k8s-extensions'
Browse files Browse the repository at this point in the history
  • Loading branch information
pmm-sumo committed Mar 5, 2020
2 parents 27c4fde + d9bf61b commit 5da2b06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion processor/k8sprocessor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

const (
sourceFormatJaeger string = "jaeger"
sourceFormatZipkin string = "zipkin"
ipLabelName string = "ip"
)

Expand Down Expand Up @@ -102,7 +103,8 @@ func (kp *kubernetesprocessor) ConsumeTraceData(ctx context.Context, td consumer
// Jaeger client libs tag the process with the process/resource IP and
// jaeger to OC translator maps jaeger process to OC node.
// TODO: Should jaeger translator map jaeger process to OC resource instead?
if podIP == "" && td.SourceFormat == sourceFormatJaeger {
// Zipkin format is grouped by common endpoints as Node by receiver
if podIP == "" && (td.SourceFormat == sourceFormatJaeger || td.SourceFormat == sourceFormatZipkin) {
if td.Node != nil {
podIP = td.Node.Attributes[ipLabelName]
}
Expand Down

0 comments on commit 5da2b06

Please sign in to comment.