chore: goinstrument

This commit is contained in:
Yusuke Kuoka
2024-05-27 04:48:16 +00:00
parent a340bfa790
commit 7bcc5c3448
24 changed files with 421 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ import (
"github.com/go-logr/logr"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"go.opentelemetry.io/otel"
"golang.org/x/net/http/httpproxy"
"golang.org/x/sync/errgroup"
)
@@ -155,6 +156,9 @@ type runOptions struct {
}
func run(ctx context.Context, rc config.Config, logger logr.Logger, opts runOptions) error {
ctx, span := otel.Tracer("arc").Start(ctx, "run")
defer span.End()
// Create root context and hook with sigint and sigterm
creds := &actions.ActionsAuth{}
if rc.Token != "" {