Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGLOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.1.17] - 2025-12-04
### Fixed
- fix baggage and tag concurrent problem

## [0.1.16] - 2025-11-10
### Fixed
- fix baggage escape problem
Expand Down
25 changes: 24 additions & 1 deletion internal/trace/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ type TagTruncateConf struct {
InputOutputFieldMaxByte int
}

func (s *Span) GetBaggage() map[string]string {
var bg map[string]string
s.lock.RLock()
rawBag := s.SpanContext.GetBaggage()
if rawBag != nil {
bg = make(map[string]string)
for k, v := range rawBag {
bg[k] = v
}
}
s.lock.RUnlock()
return bg
}

func (s *Span) setCutOffTag(cutOffKeys []string) {
if cutOffTags, ok := s.SystemTagMap[consts.CutOff]; ok {
if value, ok := cutOffTags.([]string); ok {
Expand Down Expand Up @@ -117,7 +131,16 @@ func (s *Span) GetTagMap() map[string]interface{} {
return nil
}

return s.TagMap
var tagMap map[string]interface{}
s.lock.RLock()
if s.TagMap != nil {
tagMap = make(map[string]interface{})
for k, v := range s.TagMap {
tagMap[k] = v
}
}
s.lock.RUnlock()
return tagMap
}

func (s *Span) GetDuration() int64 {
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ package internal

// Version returns the version of the loop package.
func Version() string {
return "v0.1.16"
return "v0.1.17"
}
Loading