1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

export ToZipkinSpanModels for use outside this library (#2027)

* export ToZipkinSpanModels for use outside this library

* Update CHANGELOG.md
This commit is contained in:
coryb
2021-06-23 15:30:15 -07:00
committed by GitHub
parent d5d4c87f6d
commit 16f83ce689
4 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -51,7 +51,9 @@ func init() {
}
}
func toZipkinSpanModels(batch []tracesdk.ReadOnlySpan) []zkmodel.SpanModel {
// SpanModels converts OpenTelemetry spans into Zipkin model spans.
// This is used for exporting to Zipkin compatible tracing services.
func SpanModels(batch []tracesdk.ReadOnlySpan) []zkmodel.SpanModel {
models := make([]zkmodel.SpanModel, 0, len(batch))
for _, data := range batch {
models = append(models, toZipkinSpanModel(data))