This repository was archived by the owner on Sep 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
enterprise/cmd/llm-proxy/internal/actor Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,9 @@ func (s *sourcesSyncHandler) Handle(ctx context.Context) (err error) {
159159 if err := s .rmux .LockContext (ctx ); errors .HasType (err , & redsync.ErrTaken {}) {
160160 msg := fmt .Sprintf ("did not acquire lock, another worker is likely active: %s" , err .Error ())
161161 handleLogger .Debug (msg )
162- trace .SpanFromContext (ctx ).AddEvent (msg )
162+ trace .SpanFromContext (ctx ).SetAttributes (
163+ attribute .Bool ("skipped" , true ),
164+ attribute .String ("reason" , msg ))
163165
164166 return nil // ignore lock contention errors
165167 } else if err != nil {
@@ -171,6 +173,9 @@ func (s *sourcesSyncHandler) Handle(ctx context.Context) (err error) {
171173 _ , _ = s .rmux .ExtendContext (ctx )
172174 }
173175
176+ // Annotate span to indicate we're actually doing work today!
177+ trace .SpanFromContext (ctx ).SetAttributes (attribute .Bool ("skipped" , false ))
178+
174179 p := pool .New ().WithErrors ().WithContext (ctx )
175180 for _ , src := range s .sources {
176181 if src , ok := src .(SourceSyncer ); ok {
You can’t perform that action at this time.
0 commit comments