mirror of
https://github.com/libp2p/go-libp2p-resource-manager.git
synced 2026-08-22 11:33:28 +08:00
fix marshalling of allowlisted scopes
This commit is contained in:
2
trace.go
2
trace.go
@@ -83,7 +83,7 @@ func (s scopeClass) MarshalJSON() ([]byte, error) {
|
||||
span = name[idx+5:]
|
||||
}
|
||||
// System and Transient scope
|
||||
if name == "system" || name == "transient" {
|
||||
if name == "system" || name == "transient" || name == "allowlistedSystem" || name == "allowlistedTransient" {
|
||||
return json.Marshal(struct {
|
||||
Class string
|
||||
Span string `json:",omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user