Skip to content

Commit

Permalink
Include process kv in span and root logs (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
mapno authored Apr 29, 2021
1 parent 44bc96d commit 888e6a7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ func (p *automaticLoggingProcessor) ConsumeTraces(ctx context.Context, td pdata.
traceID := span.TraceID().HexString()

if p.cfg.Spans {
p.exportToLoki(typeSpan, traceID, p.spanKeyVals(span, svc)...)
p.exportToLoki(typeSpan, traceID, append(p.spanKeyVals(span, svc), p.processKeyVals(rs.Resource(), svc)...)...)
}

if p.cfg.Roots && span.ParentSpanID().IsEmpty() {
p.exportToLoki(typeRoot, traceID, p.spanKeyVals(span, svc)...)
p.exportToLoki(typeRoot, traceID, append(p.spanKeyVals(span, svc), p.processKeyVals(rs.Resource(), svc)...)...)
}

if p.cfg.Processes && lastTraceID != traceID {
Expand Down

0 comments on commit 888e6a7

Please sign in to comment.