Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
an1l4 committed Feb 15, 2024
1 parent 710b78e commit cc3e442
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions agent/kubviz/plugins/kuberhealthy/kuberhealthy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kuberhealthy

import (
"context"
//"context"
"encoding/json"
"fmt"
"io"
Expand All @@ -11,10 +11,10 @@ import (

"github.com/intelops/kubviz/agent/config"
"github.com/intelops/kubviz/constants"
"github.com/intelops/kubviz/pkg/opentelemetry"
//"github.com/intelops/kubviz/pkg/opentelemetry"
"github.com/kuberhealthy/kuberhealthy/v2/pkg/health"
"github.com/nats-io/nats.go"
"go.opentelemetry.io/otel"
//"go.opentelemetry.io/otel"
)

func StartKuberHealthy(js nats.JetStreamContext) {
Expand Down Expand Up @@ -53,10 +53,10 @@ func pollAndPublishKuberhealthy(url string, js nats.JetStreamContext) error {
}

func PublishKuberhealthyMetrics(js nats.JetStreamContext, state health.State) error {
ctx := context.Background()
tracer := otel.Tracer("kuberhealthy")
_, span := tracer.Start(opentelemetry.BuildContext(ctx), "PublishKuberhealthyMetrics")
defer span.End()
// ctx := context.Background()
// tracer := otel.Tracer("kuberhealthy")
// _, span := tracer.Start(opentelemetry.BuildContext(ctx), "PublishKuberhealthyMetrics")
// defer span.End()

metricsJSON, err := json.Marshal(state)
if err != nil {
Expand Down

0 comments on commit cc3e442

Please sign in to comment.