Skip to content

Commit

Permalink
Add Url.Full
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon committed Aug 10, 2023
1 parent a636758 commit ff0bfc7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion input/otlp/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ const (
attributeNetworkMNC = "net.host.carrier.mnc"
attributeNetworkCarrierName = "net.host.carrier.name"
attributeNetworkICC = "net.host.carrier.icc"

attributeUrlFull = "url.full"
)

// ConsumeTraces consumes OpenTelemetry trace data,
Expand Down Expand Up @@ -560,7 +562,7 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode
case semconv.AttributeHTTPTarget:
httpTarget = stringval
isHTTP = true
case semconv.AttributeHTTPURL:
case semconv.AttributeURLFULL:
httpURL = stringval
isHTTP = true
case semconv.AttributeHTTPMethod:
Expand Down Expand Up @@ -652,6 +654,11 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode
isRPC = true
case semconv.AttributeRPCMethod:

// url.*
case semconv.AttributeHTTPURL:
httpURL = stringval
isHTTP = true

// miscellaneous
case "span.kind": // filter out
case semconv.AttributePeerService:
Expand Down

0 comments on commit ff0bfc7

Please sign in to comment.