Skip to content

Commit

Permalink
Deprecated fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Jun 18, 2024
1 parent 5cf563c commit f445e4c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions agent/kubviz/plugins/trivy/trivy_sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import (
"github.com/google/uuid"
"github.com/intelops/kubviz/constants"
"github.com/intelops/kubviz/model"
"github.com/intelops/kubviz/pkg/opentelemetry"
"github.com/nats-io/nats.go"
"github.com/pkg/errors"
"go.opentelemetry.io/otel"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
Expand Down Expand Up @@ -63,10 +65,10 @@ func RunTrivySbomScan(config *rest.Config, js nats.JetStreamContext) error {
return err
}

// ctx := context.Background()
// tracer := otel.Tracer("trivy-sbom")
// _, span := tracer.Start(opentelemetry.BuildContext(ctx), "RunTrivySbomScan")
// defer span.End()
ctx := context.Background()
tracer := otel.Tracer("trivy-sbom")
_, span := tracer.Start(opentelemetry.BuildContext(ctx), "RunTrivySbomScan")
defer span.End()

images, err := ListImagesforSbom(config)

Expand Down

0 comments on commit f445e4c

Please sign in to comment.