From bebdeef4d918f55df2d33d45d103a7f64cd7d4b9 Mon Sep 17 00:00:00 2001 From: Alex Saunders Date: Fri, 18 Oct 2024 12:38:07 +0100 Subject: [PATCH 1/5] MLPAB-2607 try adding xray to scheduler --- cmd/schedule-runner/main.go | 23 ++++++++++++++++++- go.mod | 9 ++++---- go.sum | 18 ++++++++------- .../region/modules/schedule_runner/lambda.tf | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) diff --git a/cmd/schedule-runner/main.go b/cmd/schedule-runner/main.go index 40a78109f9..276dcfd2c4 100644 --- a/cmd/schedule-runner/main.go +++ b/cmd/schedule-runner/main.go @@ -19,6 +19,9 @@ import ( "github.com/ministryofjustice/opg-modernising-lpa/internal/scheduled" "github.com/ministryofjustice/opg-modernising-lpa/internal/search" "github.com/ministryofjustice/opg-modernising-lpa/internal/secrets" + "github.com/ministryofjustice/opg-modernising-lpa/internal/telemetry" + lambdadetector "go.opentelemetry.io/contrib/detectors/aws/lambda" + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" ) func handleRunSchedule(ctx context.Context) error { @@ -30,6 +33,7 @@ func handleRunSchedule(ctx context.Context) error { searchIndexName = cmp.Or(os.Getenv("SEARCH_INDEX_NAME"), "lpas") searchIndexingEnabled = os.Getenv("SEARCH_INDEXING_DISABLED") != "1" tableName = os.Getenv("LPAS_TABLE") + xrayEnabled = os.Getenv("XRAY_ENABLED") == "1" ) logger := slog.New(slog.NewJSONHandler(os.Stdout, nil). @@ -57,7 +61,24 @@ func handleRunSchedule(ctx context.Context) error { return err } - notifyClient, err := notify.New(logger, notifyIsProduction, notifyBaseURL, notifyApiKey, http.DefaultClient, event.NewClient(cfg, eventBusName), bundle) + httpClient := http.DefaultClient + + if xrayEnabled { + resource, err := lambdadetector.NewResourceDetector().Detect(ctx) + if err != nil { + return err + } + + shutdown, err := telemetry.Setup(ctx, resource) + if err != nil { + return err + } + defer shutdown(ctx) + + httpClient.Transport = otelhttp.NewTransport(httpClient.Transport) + } + + notifyClient, err := notify.New(logger, notifyIsProduction, notifyBaseURL, notifyApiKey, httpClient, event.NewClient(cfg, eventBusName), bundle) if err != nil { return err } diff --git a/go.mod b/go.mod index a8699076f7..bf134ba523 100644 --- a/go.mod +++ b/go.mod @@ -31,13 +31,14 @@ require ( github.com/vektra/mockery/v2 v2.46.2 github.com/xeipuuv/gojsonschema v1.2.0 go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0 + go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 go.opentelemetry.io/contrib/propagators/aws v1.30.0 - go.opentelemetry.io/otel v1.30.0 + go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 - go.opentelemetry.io/otel/sdk v1.30.0 - go.opentelemetry.io/otel/trace v1.30.0 + go.opentelemetry.io/otel/sdk v1.31.0 + go.opentelemetry.io/otel/trace v1.31.0 golang.org/x/mod v0.21.0 golang.org/x/time v0.7.0 golang.org/x/tools v0.26.0 @@ -97,7 +98,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect diff --git a/go.sum b/go.sum index 6079e1190f..526b103fb1 100644 --- a/go.sum +++ b/go.sum @@ -202,24 +202,26 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0 h1:tyAMwh9XYbINOpW62iYo2k7ZlPgjEulbEFudzlY8H1I= go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0/go.mod h1:NuMawOvkflSsTZAu3iF3ydeF4spFQUnf8DYjK8YdqYI= +go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0 h1:FTzAAMcFjTSYuF1CFOuJtXIY6E676FpAt0sbYmSpxVM= +go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0/go.mod h1:eeNBumBx4wvpNoi28jNnnh/mfjSAcFxvj7EZTxN747E= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0 h1:MnAevUB0SFfKALzF5ApgrArdvHZduRT3/e59L/lNYKE= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0/go.mod h1:MHPbT1EvQOZMGbKeuCovYWcyM9iaxcltRf7+GsU8ziE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= go.opentelemetry.io/contrib/propagators/aws v1.30.0 h1:zgdTJFAOV7Hz8Qj2WyFn9dcKY5lGzzbzjZwVyb3hLpQ= go.opentelemetry.io/contrib/propagators/aws v1.30.0/go.mod h1:91m2Z4jJlILKAJmqRD/AeNiJrTNquB0m/o6dV15WMiI= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= diff --git a/terraform/environment/region/modules/schedule_runner/lambda.tf b/terraform/environment/region/modules/schedule_runner/lambda.tf index 65c5a79b87..396d4e2d81 100644 --- a/terraform/environment/region/modules/schedule_runner/lambda.tf +++ b/terraform/environment/region/modules/schedule_runner/lambda.tf @@ -10,6 +10,7 @@ module "schedule_runner" { SEARCH_ENDPOINT = var.search_endpoint SEARCH_INDEX_NAME = var.search_index_name SEARCH_INDEXING_DISABLED = 1 + XRAY_ENABLED = 1 } image_uri = "${var.lambda_function_image_ecr_url}:${var.lambda_function_image_tag}" aws_iam_role = var.schedule_runner_lambda_role From 95121bb3c4c56807f9b54261238eea15019bf4f6 Mon Sep 17 00:00:00 2001 From: Alex Saunders Date: Mon, 21 Oct 2024 10:26:16 +0100 Subject: [PATCH 2/5] MLPAB-2607 add Make command for schedule runner --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index f0f48ed61e..572b1ed752 100644 --- a/Makefile +++ b/Makefile @@ -176,3 +176,6 @@ delete-lpa-index: ##@opensearch deletes the lpa index add-scheduled-events: go run ./scripts/add-scheduled-items.go + +run-schedule-runner: ##@scheduler invokes the schedule-runner lambda + curl "http://localhost:9002/2015-03-31/functions/function/invocations" From 7792c494f5e3d93448e3dbedfefcb5945eba1978 Mon Sep 17 00:00:00 2001 From: Alex Saunders Date: Mon, 21 Oct 2024 10:44:44 +0100 Subject: [PATCH 3/5] MLPAB-2607 add mopup persist for scheduled items script --- scripts/add-scheduled-items.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/add-scheduled-items.go b/scripts/add-scheduled-items.go index 45b4216534..af933db7b0 100644 --- a/scripts/add-scheduled-items.go +++ b/scripts/add-scheduled-items.go @@ -46,7 +46,7 @@ func main() { var items []any now := time.Now() - for i := 0; i < 10_000; i++ { + for i := 0; i < 1; i++ { now = now.Add(time.Second * 1) donor := &donordata.Provided{ @@ -76,4 +76,10 @@ func main() { items = []any{} } } + + if len(items) > 0 { + if err := client.BatchPut(ctx, items); err != nil { + log.Fatal(err) + } + } } From e2988b657718630ff333335a7347f50cfd912f89 Mon Sep 17 00:00:00 2001 From: Alex Saunders Date: Mon, 21 Oct 2024 12:09:03 +0100 Subject: [PATCH 4/5] MLPAB-2607 apply telemetry to schedule runner --- cmd/mlpa/main.go | 2 +- cmd/schedule-runner/main.go | 58 ++++++++++++++++++++----------- docker/docker-compose.dev.yml | 3 +- docker/docker-compose.yml | 1 + docker/schedule-runner/Dockerfile | 2 +- go.mod | 2 ++ go.sum | 4 +++ internal/telemetry/telemetry.go | 33 +++++++++++++----- 8 files changed, 73 insertions(+), 32 deletions(-) diff --git a/cmd/mlpa/main.go b/cmd/mlpa/main.go index 733c66a944..f462e96a0e 100644 --- a/cmd/mlpa/main.go +++ b/cmd/mlpa/main.go @@ -130,7 +130,7 @@ func run(ctx context.Context, logger *slog.Logger) error { return err } - shutdown, err := telemetry.Setup(ctx, resource) + shutdown, err := telemetry.Setup(ctx, strings.Contains(appPublicURL, "localhost"), resource) if err != nil { return err } diff --git a/cmd/schedule-runner/main.go b/cmd/schedule-runner/main.go index 276dcfd2c4..f07a991374 100644 --- a/cmd/schedule-runner/main.go +++ b/cmd/schedule-runner/main.go @@ -7,9 +7,11 @@ import ( "log/slog" "net/http" "os" + "strings" "time" "github.com/aws/aws-lambda-go/lambda" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/ministryofjustice/opg-modernising-lpa/internal/donor" "github.com/ministryofjustice/opg-modernising-lpa/internal/dynamo" @@ -21,11 +23,15 @@ import ( "github.com/ministryofjustice/opg-modernising-lpa/internal/secrets" "github.com/ministryofjustice/opg-modernising-lpa/internal/telemetry" lambdadetector "go.opentelemetry.io/contrib/detectors/aws/lambda" + "go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda" + "go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + "go.opentelemetry.io/otel" ) func handleRunSchedule(ctx context.Context) error { var ( + awsBaseURL = os.Getenv("AWS_BASE_URL") eventBusName = cmp.Or(os.Getenv("EVENT_BUS_NAME"), "default") notifyBaseURL = os.Getenv("GOVUK_NOTIFY_BASE_URL") notifyIsProduction = os.Getenv("GOVUK_NOTIFY_IS_PRODUCTION") == "1" @@ -36,14 +42,38 @@ func handleRunSchedule(ctx context.Context) error { xrayEnabled = os.Getenv("XRAY_ENABLED") == "1" ) + cfg, err := config.LoadDefaultConfig(ctx) + if err != nil { + return fmt.Errorf("failed to load default config: %w", err) + } + + httpClient := &http.Client{Timeout: time.Second * 30} + + if xrayEnabled { + resource, err := lambdadetector.NewResourceDetector().Detect(ctx) + if err != nil { + return err + } + + shutdown, err := telemetry.Setup(ctx, strings.Contains(notifyBaseURL, "mock-notify"), resource) + if err != nil { + return err + } + + defer shutdown(ctx) + + httpClient.Transport = otelhttp.NewTransport(httpClient.Transport) + } + + otelaws.AppendMiddlewares(&cfg.APIOptions) + logger := slog.New(slog.NewJSONHandler(os.Stdout, nil). WithAttrs([]slog.Attr{ slog.String("service_name", "opg-modernising-lpa/schedule-runner"), })) - cfg, err := config.LoadDefaultConfig(ctx) - if err != nil { - return fmt.Errorf("failed to load default config: %w", err) + if len(awsBaseURL) > 0 { + cfg.BaseEndpoint = aws.String(awsBaseURL) } secretsClient, err := secrets.NewClient(cfg, time.Hour) @@ -61,23 +91,6 @@ func handleRunSchedule(ctx context.Context) error { return err } - httpClient := http.DefaultClient - - if xrayEnabled { - resource, err := lambdadetector.NewResourceDetector().Detect(ctx) - if err != nil { - return err - } - - shutdown, err := telemetry.Setup(ctx, resource) - if err != nil { - return err - } - defer shutdown(ctx) - - httpClient.Transport = otelhttp.NewTransport(httpClient.Transport) - } - notifyClient, err := notify.New(logger, notifyIsProduction, notifyBaseURL, notifyApiKey, httpClient, event.NewClient(cfg, eventBusName), bundle) if err != nil { return err @@ -109,5 +122,8 @@ func handleRunSchedule(ctx context.Context) error { } func main() { - lambda.Start(handleRunSchedule) + handler := otellambda.InstrumentHandler(handleRunSchedule, + otellambda.WithTracerProvider(otel.GetTracerProvider()), + ) + lambda.Start(handler) } diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index b41728cfec..2c56b7561e 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -58,7 +58,7 @@ services: platforms: - "linux/amd64" - "linux/arm64" - container_name: schedule-runner + container_name: schedule-runner-lambda environment: - AWS_ACCESS_KEY_ID=fakeKeyId - AWS_BASE_URL=http://localstack:4566 @@ -68,6 +68,7 @@ services: - GOVUK_NOTIFY_IS_PRODUCTION=0 - GOVUK_NOTIFY_BASE_URL=http://mock-notify:8080 - SEARCH_ENDPOINT=http://my-domain.eu-west-1.opensearch.localhost.localstack.cloud:4566 + - XRAY_ENABLED=1 ports: - "9002:8080" entrypoint: aws-lambda-rie /var/task/schedule-runner diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 8c868d2e3b..fe9d5bc4e5 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -29,6 +29,7 @@ services: - DEV_MODE=1 - SCHEDULED_RUNNER_PERIOD=1m - LPA_STORE_SECRET_ARN=lpa-store-jwt-secret-key + - XRAY_ENABLED=1 event-logger: build: diff --git a/docker/schedule-runner/Dockerfile b/docker/schedule-runner/Dockerfile index 8b5f076928..3692b5c9b6 100644 --- a/docker/schedule-runner/Dockerfile +++ b/docker/schedule-runner/Dockerfile @@ -15,7 +15,7 @@ FROM public.ecr.aws/lambda/provided:al2023.2024.10.14.12 AS dev WORKDIR /app COPY --from=build /app/schedule-runner /var/task/schedule-runner -COPY --link lang /var/task/lang +COPY --link lang ./lang COPY --link docker/aws-lambda-rie ./aws-lambda-rie ENTRYPOINT ["./schedule-runner"] diff --git a/go.mod b/go.mod index bf134ba523..5721600bcb 100644 --- a/go.mod +++ b/go.mod @@ -32,11 +32,13 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0 go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0 + go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.56.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 go.opentelemetry.io/contrib/propagators/aws v1.30.0 go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 go.opentelemetry.io/otel/sdk v1.31.0 go.opentelemetry.io/otel/trace v1.31.0 golang.org/x/mod v0.21.0 diff --git a/go.sum b/go.sum index 526b103fb1..b4dc9888c4 100644 --- a/go.sum +++ b/go.sum @@ -204,6 +204,8 @@ go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0 h1:tyAMwh9XYbINOpW62iYo2k7 go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0/go.mod h1:NuMawOvkflSsTZAu3iF3ydeF4spFQUnf8DYjK8YdqYI= go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0 h1:FTzAAMcFjTSYuF1CFOuJtXIY6E676FpAt0sbYmSpxVM= go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0/go.mod h1:eeNBumBx4wvpNoi28jNnnh/mfjSAcFxvj7EZTxN747E= +go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.56.0 h1:GnAB6hpgyeNmSp+7ctZ5iQlcHfR6P4v//x1pjqbLD60= +go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.56.0/go.mod h1:LZFxLDlfl6RRNH8MgtUrqC0ahBuF+euBMSnt6xuKdsE= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0 h1:MnAevUB0SFfKALzF5ApgrArdvHZduRT3/e59L/lNYKE= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0/go.mod h1:MHPbT1EvQOZMGbKeuCovYWcyM9iaxcltRf7+GsU8ziE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= @@ -216,6 +218,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyy go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= diff --git a/internal/telemetry/telemetry.go b/internal/telemetry/telemetry.go index fb1749e5ec..8573a57f7a 100644 --- a/internal/telemetry/telemetry.go +++ b/internal/telemetry/telemetry.go @@ -7,6 +7,7 @@ import ( "fmt" "log/slog" "net/http" + "os" "strings" "github.com/felixge/httpsnoop" @@ -15,18 +16,34 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" + "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" semconv "go.opentelemetry.io/otel/semconv/v1.12.0" "go.opentelemetry.io/otel/trace" ) -func Setup(ctx context.Context, resource *resource.Resource) (func(context.Context) error, error) { - traceExporter, err := otlptracegrpc.New(ctx, - otlptracegrpc.WithInsecure(), - otlptracegrpc.WithEndpoint("0.0.0.0:4317")) - if err != nil { - return nil, fmt.Errorf("failed to create new OTLP trace exporter: %w", err) +func Setup(ctx context.Context, stdOutOverride bool, resource *resource.Resource) (func(context.Context) error, error) { + var exporter sdktrace.SpanExporter + var err error + + if stdOutOverride { + // Create console exporter to be able to retrieve spans + exporter, err = stdouttrace.New( + stdouttrace.WithPrettyPrint(), + stdouttrace.WithWriter(os.Stdout), + ) + + if err != nil { + return nil, fmt.Errorf("failed to create console exporter: %w", err) + } + } else { + exporter, err = otlptracegrpc.New(ctx, + otlptracegrpc.WithInsecure(), + otlptracegrpc.WithEndpoint("0.0.0.0:4317")) + if err != nil { + return nil, fmt.Errorf("failed to create new OTLP trace exporter: %w", err) + } } idg := xray.NewIDGenerator() @@ -34,14 +51,14 @@ func Setup(ctx context.Context, resource *resource.Resource) (func(context.Conte tp := sdktrace.NewTracerProvider( sdktrace.WithResource(resource), sdktrace.WithSampler(sdktrace.AlwaysSample()), - sdktrace.WithBatcher(traceExporter), + sdktrace.WithBatcher(exporter), sdktrace.WithIDGenerator(idg), ) otel.SetTracerProvider(tp) otel.SetTextMapPropagator(xray.Propagator{}) - return traceExporter.Shutdown, nil + return exporter.Shutdown, nil } func WrapHandler(handler http.Handler) http.HandlerFunc { From 40202c2e68581a6b28abddfd5ef283c4f426e1e8 Mon Sep 17 00:00:00 2001 From: Alex Saunders Date: Mon, 21 Oct 2024 12:17:11 +0100 Subject: [PATCH 5/5] MLPAB-2607 fix missing imports --- cmd/schedule-runner/main.go | 8 +++---- go.sum | 46 +++++-------------------------------- 2 files changed, 10 insertions(+), 44 deletions(-) diff --git a/cmd/schedule-runner/main.go b/cmd/schedule-runner/main.go index f07a991374..ae6a032d20 100644 --- a/cmd/schedule-runner/main.go +++ b/cmd/schedule-runner/main.go @@ -65,6 +65,10 @@ func handleRunSchedule(ctx context.Context) error { httpClient.Transport = otelhttp.NewTransport(httpClient.Transport) } + if len(awsBaseURL) > 0 { + cfg.BaseEndpoint = aws.String(awsBaseURL) + } + otelaws.AppendMiddlewares(&cfg.APIOptions) logger := slog.New(slog.NewJSONHandler(os.Stdout, nil). @@ -72,10 +76,6 @@ func handleRunSchedule(ctx context.Context) error { slog.String("service_name", "opg-modernising-lpa/schedule-runner"), })) - if len(awsBaseURL) > 0 { - cfg.BaseEndpoint = aws.String(awsBaseURL) - } - secretsClient, err := secrets.NewClient(cfg, time.Hour) if err != nil { return err diff --git a/go.sum b/go.sum index cc0fd2e830..a6876c2b5e 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,6 @@ github.com/aws/aws-sdk-go-v2 v1.32.2 h1:AkNLZEyYMLnx/Q/mSKkcMqwNFXMAvFto9bNsHqcT github.com/aws/aws-sdk-go-v2 v1.32.2/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 h1:pT3hpW0cOHRJx8Y0DfJUEQuqPild8jRGmSFmBgvydr0= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6/go.mod h1:j/I2++U0xX+cr44QjHay4Cvxj6FUbnxrgmqN3H1jTZA= -github.com/aws/aws-sdk-go-v2/config v1.27.43 h1:p33fDDihFC390dhhuv8nOmX419wjOSDQRb+USt20RrU= -github.com/aws/aws-sdk-go-v2/config v1.27.43/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= github.com/aws/aws-sdk-go-v2/config v1.28.0 h1:FosVYWcqEtWNxHn8gB/Vs6jOlNwSoyOCA/g/sxyySOQ= github.com/aws/aws-sdk-go-v2/config v1.28.0/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= @@ -42,8 +40,6 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2 h1:t7iUP9+4wdc5lt3E41huP+GvQZJD38WLsgVp4iOtAjg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2/go.mod h1:/niFCtmuQNxqx9v8WAPq5qh7EH25U4BF6tjoyq9bObM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.65.2 h1:yi8m+jepdp6foK14xXLGkYBenxnlcfJ45ka4Pg7fDSQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.65.2/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0 h1:xA6XhTF7PE89BCNHJbQi8VvPzcgMtmGC5dr8S8N7lHk= github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 h1:Rrqru2wYkKQCS2IM5/JrgKUQIoNTqA6y/iuxkjzxC6M= @@ -78,8 +74,6 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4= -github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4= github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc= github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -135,8 +129,6 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/ministryofjustice/opg-go-common v1.18.0 h1:mgU2n3TpF8E7R5TXGQeQ/U2/+EfyU+rCMrdGkzf36x8= -github.com/ministryofjustice/opg-go-common v1.18.0/go.mod h1:mtyOXWagT8HzXEJXMMH8WcL1bWUkBdpSBgebDskjM0c= github.com/ministryofjustice/opg-go-common v1.25.0 h1:3IStVH4h5GP4rcNP0EgAe1G/ZIsXngYIIl0Yi4X4cqM= github.com/ministryofjustice/opg-go-common v1.25.0/go.mod h1:Ty1VoKA8xg8TnKRoeiV9a6ywbrvdd1GNMlXcckfdHms= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -145,8 +137,6 @@ github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4 github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/opensearch-project/opensearch-go/v4 v4.2.0 h1:uaBexfVdeSU15yOUPYF+IY059koVP0oNQPyoSde6N/A= -github.com/opensearch-project/opensearch-go/v4 v4.2.0/go.mod h1:9v6a0OHRIeHwLPQlHOia18bw6R5XKECoXy93TWjX/10= github.com/opensearch-project/opensearch-go/v4 v4.3.0 h1:gmQ+ILFJW6AJimivf+lHGVqCS2SCr/PBBf2Qr1xOCgE= github.com/opensearch-project/opensearch-go/v4 v4.3.0/go.mod h1:+w6KAvEX3S0fVVmZciNLN0CkXhxxem26+F6Y7DoPp04= github.com/pact-foundation/pact-go/v2 v2.0.8 h1:j9s/tk46O5hpEEbYd0/QF9kQlQt/mu3HJrVJVeix54w= @@ -157,8 +147,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= @@ -200,8 +190,7 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/vektra/mockery/v2 v2.46.2 h1:bpUncWvkiDzqn+aWwt4dY1aS0F8Ob4k8+WJrWU/Kh4s= -github.com/vektra/mockery/v2 v2.46.2/go.mod h1:dDivqi0ShM8A29mLgZn13yZ14MdXlTM4V360u8JDWCQ= +github.com/vektra/mockery/v2 v2.46.3 h1:Aia4iShZeNTy6CZJcvweK4X97XOzXcqb+k9jm8IqBS0= github.com/vektra/mockery/v2 v2.46.3/go.mod h1:dDivqi0ShM8A29mLgZn13yZ14MdXlTM4V360u8JDWCQ= github.com/wI2L/jsondiff v0.6.0 h1:zrsH3FbfVa3JO9llxrcDy/XLkYPLgoMX6Mz3T2PP2AI= github.com/wI2L/jsondiff v0.6.0/go.mod h1:D6aQ5gKgPF9g17j+E9N7aasmU1O+XvfmWm1y8UMmNpw= @@ -211,47 +200,30 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0 h1:tyAMwh9XYbINOpW62iYo2k7ZlPgjEulbEFudzlY8H1I= -go.opentelemetry.io/contrib/detectors/aws/ecs v1.30.0/go.mod h1:NuMawOvkflSsTZAu3iF3ydeF4spFQUnf8DYjK8YdqYI= go.opentelemetry.io/contrib/detectors/aws/ecs v1.31.0 h1:9NnVhmpyOhAoqUow2eQADRxU5RXPamxEapA14ZerbiY= go.opentelemetry.io/contrib/detectors/aws/ecs v1.31.0/go.mod h1:mt4gForBfLxbUC/ELOFpKVn5+8sxklaJmMBLTH+di3w= +go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0 h1:FTzAAMcFjTSYuF1CFOuJtXIY6E676FpAt0sbYmSpxVM= go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0/go.mod h1:eeNBumBx4wvpNoi28jNnnh/mfjSAcFxvj7EZTxN747E= +go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.56.0 h1:GnAB6hpgyeNmSp+7ctZ5iQlcHfR6P4v//x1pjqbLD60= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.56.0/go.mod h1:LZFxLDlfl6RRNH8MgtUrqC0ahBuF+euBMSnt6xuKdsE= -go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0 h1:MnAevUB0SFfKALzF5ApgrArdvHZduRT3/e59L/lNYKE= -go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.55.0/go.mod h1:MHPbT1EvQOZMGbKeuCovYWcyM9iaxcltRf7+GsU8ziE= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.56.0 h1:bPOyEYm7Lz4W+Koclh4uMeA025PgGvG1lwQeSOrAcJc= go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.56.0/go.mod h1:iRRO4kpgl2O3XyMKKaA/Egix+DFHWp6m25SVEJyLb64= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= -go.opentelemetry.io/contrib/propagators/aws v1.30.0 h1:zgdTJFAOV7Hz8Qj2WyFn9dcKY5lGzzbzjZwVyb3hLpQ= -go.opentelemetry.io/contrib/propagators/aws v1.30.0/go.mod h1:91m2Z4jJlILKAJmqRD/AeNiJrTNquB0m/o6dV15WMiI= go.opentelemetry.io/contrib/propagators/aws v1.31.0 h1:OJHDboLd4zH1j0UrxoQbSDPEykmBJ/epVa/v+fRCRi0= go.opentelemetry.io/contrib/propagators/aws v1.31.0/go.mod h1:mtT7x7gY+jL4fH34l8dkZeo6Jvf+3Fy002rjuEdRnTM= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= @@ -284,18 +256,12 @@ golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg= google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=