mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 22:10:05 +00:00
TUN-6867: Clear spans right after they are serialized to avoid returning duplicate spans
This commit is contained in:
@@ -157,7 +157,7 @@ func (cft *cfdTracer) GetSpans() (enc string) {
|
||||
|
||||
// GetProtoSpans returns the spans as the otlp traces in protobuf byte array.
|
||||
func (cft *cfdTracer) GetProtoSpans() (proto []byte) {
|
||||
proto, err := cft.exporter.ProtoSpans()
|
||||
proto, err := cft.exporter.ExportProtoSpans()
|
||||
switch err {
|
||||
case nil:
|
||||
break
|
||||
@@ -189,10 +189,6 @@ func (cft *cfdTracer) AddSpans(headers http.Header) {
|
||||
headers[CanonicalCloudflaredTracingHeader] = []string{enc}
|
||||
}
|
||||
|
||||
func (cft *cfdTracer) ClearSpans() {
|
||||
cft.exporter.ClearSpans()
|
||||
}
|
||||
|
||||
// End will set the OK status for the span and then end it.
|
||||
func End(span trace.Span) {
|
||||
endSpan(span, -1, codes.Ok, nil)
|
||||
|
Reference in New Issue
Block a user