MCPcopy Create free account
hub / github.com/buggregator/server / extractServiceName

Function extractServiceName

modules/sentry/span_classifier.go:43–51  ·  view source on GitHub ↗

extractServiceName extracts the service name from span attributes or SDK info.

(span RawSpan, sdk *SDK)

Source from the content-addressed store, hash-verified

41
42// extractServiceName extracts the service name from span attributes or SDK info.
43func extractServiceName(span RawSpan, sdk *SDK) string {
44 if name := span.Data["service.name"]; name != "" {
45 return name
46 }
47 if sdk != nil && sdk.Name != "" {
48 return sdk.Name
49 }
50 return ""
51}
52
53func firstNonEmpty(values ...string) string {
54 for _, v := range values {

Callers 2

storeTransactionFunction · 0.85
storeSpansV2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected