Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrytfleung committed Jul 22, 2024
1 parent c78f6be commit 5032a83
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 369 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

const (
JSONOutputFile = "/tmp/solarwinds-apm-settings.json"
GrpcContextDeadline = time.Duration(10) * time.Second
GrpcContextDeadline = time.Duration(5) * time.Second
)

type solarwindsapmSettingsExtension struct {
Expand Down Expand Up @@ -176,12 +176,14 @@ func (extension *solarwindsapmSettingsExtension) Start(ctx context.Context, _ co
ctx, extension.cancel = context.WithCancel(ctx)
systemCertPool, err := x509.SystemCertPool()
if err != nil {
extension.logger.Error("Getting system cert pool failed: ", zap.Error(err))
return err
}
subjects := systemCertPool.Subjects()
extension.logger.Info("Loading system certificates", zap.Int("numberOfCertificates", len(subjects)))
extension.conn, err = grpc.NewClient(extension.config.Endpoint, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{RootCAs: systemCertPool})))
if err != nil {
extension.logger.Error("grpc.NewClient creation failed: ", zap.Error(err))
return err
}
extension.logger.Info("Created a grpc.NewClient", zap.String("endpoint", extension.config.Endpoint))
Expand Down
1 change: 1 addition & 0 deletions collector/lambdacomponents/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.102.0 // indirect
github.com/open-telemetry/opentelemetry-lambda/collector v0.0.0-00010101000000-000000000000 // indirect
github.com/open-telemetry/opentelemetry-lambda/collector/lambdalifecycle v0.0.0-00010101000000-000000000000 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
Expand Down
3 changes: 3 additions & 0 deletions collector/receiver/telemetryapireceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ go 1.21.0

toolchain go1.21.4

replace github.com/open-telemetry/opentelemetry-lambda/collector => ../../

require (
github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259
github.com/open-telemetry/opentelemetry-lambda/collector v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.102.1
go.opentelemetry.io/collector/confmap v0.102.1
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5032a83

Please sign in to comment.