Skip to content

Commit

Permalink
Adding conditionKind values to traces (#91)
Browse files Browse the repository at this point in the history
* Adding conditionKind values to traces

* remove error path
  • Loading branch information
jakeschuurmans authored Oct 16, 2023
1 parent 3b523c4 commit 7e116de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"go.hollow.sh/toolbox/events/pkg/kv"
"go.hollow.sh/toolbox/events/registry"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

cpv1types "github.com/metal-toolbox/conditionorc/pkg/api/v1/types"
Expand Down Expand Up @@ -271,6 +272,8 @@ func (o *Worker) processSingleEvent(ctx context.Context, e events.Message) {
return
}

span.SetAttributes(attribute.KeyValue{Key: "conditionKind", Value: attribute.StringValue(condition.ID.String())})

// check and see if the task is or has-been handled by another worker
currentState := o.taskInProgress(condition.ID.String())
switch currentState {
Expand Down

0 comments on commit 7e116de

Please sign in to comment.