log telemetry guard details (#4817)

* log telemetry guard details

* nil guard
This commit is contained in:
Raja Subramanian
2026-08-29 16:46:13 +05:30
committed by GitHub
parent 5528c464a0
commit c934aa29b7
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -216,6 +216,7 @@ func (t *telemetryService) ParticipantLeft(ctx context.Context,
"participant", participant.Identity,
"participantID", participant.Sid,
"worker", worker,
"guard", guard,
)
}
}
+12
View File
@@ -18,6 +18,7 @@ import (
"context"
"sync"
"time"
"unsafe"
"go.uber.org/zap/zapcore"
"google.golang.org/protobuf/types/known/timestamppb"
@@ -32,6 +33,17 @@ type ReferenceGuard struct {
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 {
count int
}