Files
traces/pkg/util/test/proto.go
ed1ce10329 Tryout otlp collector fix for retryable http errors (#3515)
* Add test to reproduce otlp http 500s

* Bad merge

* Add scary test

* Update dependencies to use juraci's collector fork and fix

* Fix mario tests regarding otlp http limits

* vendor latest collector

Signed-off-by: Jesus Vazquez <[email protected]>

---------

Signed-off-by: Jesus Vazquez <[email protected]>
Co-authored-by: Mario <[email protected]>
2024-03-27 19:23:29 +00:00

27 lines
541 B
Go

package test
import v1 "go.opentelemetry.io/proto/otlp/trace/v1"
func MakeProtoSpans(count int) []*v1.ResourceSpans {
spans := make([]*v1.ResourceSpans, 0)
for i := 0; i < count; i++ {
spans = append(spans, MakeProtoSpan())
}
return spans
}
func MakeProtoSpan() *v1.ResourceSpans {
return &v1.ResourceSpans{
ScopeSpans: []*v1.ScopeSpans{
{
Spans: []*v1.Span{
{
TraceId: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16},
SpanId: []byte{1, 2, 3, 4, 5, 6, 7, 8},
},
},
},
},
}
}