File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## [ 0.1.17] - 2025-12-04
2+ ### Fixed
3+ - fix baggage and tag concurrent problem
4+
15## [ 0.1.16] - 2025-11-10
26### Fixed
37- fix baggage escape problem
Original file line number Diff line number Diff line change @@ -83,6 +83,20 @@ type TagTruncateConf struct {
8383 InputOutputFieldMaxByte int
8484}
8585
86+ func (s * Span ) GetBaggage () map [string ]string {
87+ var bg map [string ]string
88+ s .lock .RLock ()
89+ rawBag := s .SpanContext .GetBaggage ()
90+ if rawBag != nil {
91+ bg = make (map [string ]string )
92+ for k , v := range rawBag {
93+ bg [k ] = v
94+ }
95+ }
96+ s .lock .RUnlock ()
97+ return bg
98+ }
99+
86100func (s * Span ) setCutOffTag (cutOffKeys []string ) {
87101 if cutOffTags , ok := s .SystemTagMap [consts .CutOff ]; ok {
88102 if value , ok := cutOffTags .([]string ); ok {
@@ -117,7 +131,16 @@ func (s *Span) GetTagMap() map[string]interface{} {
117131 return nil
118132 }
119133
120- return s .TagMap
134+ var tagMap map [string ]interface {}
135+ s .lock .RLock ()
136+ if s .TagMap != nil {
137+ tagMap = make (map [string ]interface {})
138+ for k , v := range s .TagMap {
139+ tagMap [k ] = v
140+ }
141+ }
142+ s .lock .RUnlock ()
143+ return tagMap
121144}
122145
123146func (s * Span ) GetDuration () int64 {
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ package internal
55
66// Version returns the version of the loop package.
77func Version () string {
8- return "v0.1.16 "
8+ return "v0.1.17 "
99}
You can’t perform that action at this time.
0 commit comments