Skip to content

Commit

Permalink
adding default service name as tracetest for root span
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Sep 10, 2024
1 parent 21211c5 commit 1052861
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/traces/span_entitiess.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const (
TracetestMetadataFieldStatusCode string = "tracetest.span.status_code"
TracetestMetadataFieldStatusDescription string = "tracetest.span.status_description"

MetadataServiceName string = "service.name"
MetadataServiceName string = "service.name"
TracetestServiceName string = "tracetest"
)

func NewAttributes(inputs ...map[string]string) Attributes {
Expand Down Expand Up @@ -372,5 +373,6 @@ func (span Span) setTriggerResultAttributes(result trigger.TriggerResult) Span {
span.Attributes.Set("tracetest.response.headers", string(jsonheaders))
}

span.Attributes.Set(MetadataServiceName, TracetestServiceName)
return span
}

0 comments on commit 1052861

Please sign in to comment.