(ss *ScopeSpans)
| 96 | } |
| 97 | |
| 98 | func scopeSpanHash(ss *ScopeSpans) uint64 { |
| 99 | hash := fnv1a.HashString64(ss.Scope.Name) |
| 100 | |
| 101 | hash = fnv1a.AddString64(hash, ss.Scope.Version) |
| 102 | |
| 103 | // sort keys for consistency |
| 104 | slices.SortFunc(ss.Scope.Attrs, func(i, j Attribute) int { |
| 105 | return strings.Compare(i.Key, j.Key) |
| 106 | }) |
| 107 | |
| 108 | for _, attr := range ss.Scope.Attrs { |
| 109 | hash = attributeHash(&attr, hash) |
| 110 | } |
| 111 | |
| 112 | return hash |
| 113 | } |
| 114 | |
| 115 | func resourceSpanHash(rs *ResourceSpans) uint64 { |
| 116 | hash := fnv1a.HashString64(rs.Resource.ServiceName) |
no test coverage detected