log telemetry guard details (#4817)
* log telemetry guard details * nil guard
This commit is contained in:
@@ -216,6 +216,7 @@ func (t *telemetryService) ParticipantLeft(ctx context.Context,
|
|||||||
"participant", participant.Identity,
|
"participant", participant.Identity,
|
||||||
"participantID", participant.Sid,
|
"participantID", participant.Sid,
|
||||||
"worker", worker,
|
"worker", worker,
|
||||||
|
"guard", guard,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
"google.golang.org/protobuf/types/known/timestamppb"
|
"google.golang.org/protobuf/types/known/timestamppb"
|
||||||
@@ -32,6 +33,17 @@ type ReferenceGuard struct {
|
|||||||
activated, released bool
|
activated, released bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *ReferenceGuard) MarshalLogObject(e zapcore.ObjectEncoder) error {
|
||||||
|
if r != nil {
|
||||||
|
e.AddUintptr("self", uintptr(unsafe.Pointer(r)))
|
||||||
|
e.AddBool("activated", r.activated)
|
||||||
|
e.AddBool("released", r.released)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------
|
||||||
|
|
||||||
type ReferenceCount struct {
|
type ReferenceCount struct {
|
||||||
count int
|
count int
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user