From 84ce41e72076c9c99e1b58a710b7e629f2e91808 Mon Sep 17 00:00:00 2001 From: afzal442 Date: Sat, 19 Aug 2023 20:10:51 +0530 Subject: [PATCH] makes samptypeProb private and movs to model spans Signed-off-by: afzal442 --- model/span.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/model/span.go b/model/span.go index a6d7d55c484..35ae7f2e538 100644 --- a/model/span.go +++ b/model/span.go @@ -33,9 +33,10 @@ const ( // FirehoseFlag is the bit in Flags in order to define a span as a firehose span FirehoseFlag = Flags(8) - samplerType = "sampler.type" - keySpanKind = "span.kind" - samplerTypeUnknown = "unknown" + samplerType = "sampler.type" + keySpanKind = "span.kind" + samplerTypeUnknown = "unknown" + samplerTypeProbabilistic = "probabilistic" ) // Flags is a bit map of flags for a span @@ -82,6 +83,8 @@ func (s *Span) GetSamplerType() string { if tag, ok := KeyValues(s.Tags).FindByKey(samplerType); ok { if tag.VStr == "" { return samplerTypeUnknown + } else if tag.VStr == "probabilistic" { + return samplerTypeProbabilistic } return tag.VStr }