MCPcopy
hub / github.com/grafana/tempo / makeResourceSpans

Function makeResourceSpans

modules/distributor/distributor_test.go:1821–1841  ·  view source on GitHub ↗
(serviceName string, ils []*v1.ScopeSpans, attributes ...*v1_common.KeyValue)

Source from the content-addressed store, hash-verified

1819}
1820
1821func makeResourceSpans(serviceName string, ils []*v1.ScopeSpans, attributes ...*v1_common.KeyValue) *v1.ResourceSpans {
1822 rs := &v1.ResourceSpans{
1823 Resource: &v1_resource.Resource{
1824 Attributes: []*v1_common.KeyValue{
1825 {
1826 Key: "service.name",
1827 Value: &v1_common.AnyValue{
1828 Value: &v1_common.AnyValue_StringValue{
1829 StringValue: serviceName,
1830 },
1831 },
1832 },
1833 },
1834 },
1835 ScopeSpans: ils,
1836 }
1837
1838 rs.Resource.Attributes = append(rs.Resource.Attributes, attributes...)
1839
1840 return rs
1841}
1842
1843func prepare(t *testing.T, limits overrides.Config, logger kitlog.Logger) *Distributor {
1844 if logger == nil {

Callers 4

TestLogReceivedSpansFunction · 0.85
TestRateLimitRespectedFunction · 0.85
TestArtificialLatencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected