Closed mfolivas closed 1 year ago
Hi @mfolivas,
Thanks for raising this issue. Have you tried running npm rebuild
in your environment as suggested by the error message? That should resolve the issue as a workaround for now, and we are also investigating this problem to remove that extra step altogether. I will post any updates here.
Thanks @willarmiros , I tried and it didn't work. I also noticed that the OTEL collector that I was using was pointing to the wrong port:
git clone https://github.com/aws-observability/aws-otel-collector.git ; \
cd aws-otel-collector; \
docker run --rm -p 4317:4317 -p 55679:55679 -p 8889:8888 \
-e AWS_REGION=us-west-2 \
-v "${PWD}/examples/config-test.yaml":/otel-local-config.yaml \
--name awscollector public.ecr.aws/aws-observability/aws-otel-collector:latest \
--config otel-local-config.yaml;
@mfolivas thanks for raising this, I've opened a PR to update the collector's docs with the right port number. I was able to reproduce the gRPC binary but npm rb
did resolve it for me. Could you try starting from scratch using these instructions? If that works, you can adjust the provided sample app to your use case and continue from there. Apologies again for this inconvenience.
I'm getting the following error once I did the following: npm install && npm rb
:
{"stack":"Error: 2 UNKNOWN: NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors\n at Object.exports.createStatusError (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/common.js:91:15)\n at Object.onReceiveStatus (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:1209:28)\n at InterceptingListener._callNext (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:618:8)\n at callback (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:847:24)","message":"2 UNKNOWN: NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors","code":"2","metadata":"[object Object]","details":"NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors","name":"Error"}
I'm running the following aws-otel-collector
and getting the following error:
docker run --rm -p 4317:4317 -p 55680:55680 -p 8889:8888 -e AWS_REGION=us-west-2 -v "${PWD}/examples/config-test.yaml":/otel-local-config.yaml --name awscollector public.ecr.aws/aws-observability/aws-otel-collector:latest --config otel-local-config.yaml;
error:
2021-02-23T01:42:57.250Z ERROR exporterhelper/queued_retry.go:204 Exporting failed. Try enabling retry_on_failure config option. {"component_kind": "exporter", "component_type": "awsxray", "component_name": "awsxray", "error": "NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors"}
go.opentelemetry.io/collector/exporter/exporterhelper.(*retrySender).send
go.opentelemetry.io/collector@v0.19.0/exporter/exporterhelper/queued_retry.go:204
go.opentelemetry.io/collector/exporter/exporterhelper.(*tracesExporterWithObservability).send
go.opentelemetry.io/collector@v0.19.0/exporter/exporterhelper/tracehelper.go:114
go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).send
go.opentelemetry.io/collector@v0.19.0/exporter/exporterhelper/queued_retry.go:140
go.opentelemetry.io/collector/exporter/exporterhelper.(*traceExporter).ConsumeTraces
go.opentelemetry.io/collector@v0.19.0/exporter/exporterhelper/tracehelper.go:68
go.opentelemetry.io/collector/receiver/otlpreceiver/trace.(*Receiver).sendToNextConsumer
go.opentelemetry.io/collector@v0.19.0/receiver/otlpreceiver/trace/otlp.go:103
go.opentelemetry.io/collector/receiver/otlpreceiver/trace.(*Receiver).Export
go.opentelemetry.io/collector@v0.19.0/receiver/otlpreceiver/trace/otlp.go:84
go.opentelemetry.io/collector/internal/data/protogen/collector/trace/v1._TraceService_Export_Handler
go.opentelemetry.io/collector@v0.19.0/internal/data/protogen/collector/trace/v1/trace_service.pb.go:210
google.golang.org/grpc.(*Server).processUnaryRPC
google.golang.org/grpc@v1.35.0/server.go:1217
google.golang.org/grpc.(*Server).handleStream
google.golang.org/grpc@v1.35.0/server.go:1540
google.golang.org/grpc.(*Server).serveStreams.func1.2
google.golang.org/grpc@v1.35.0/server.go:878
@mfolivas I see, this is a problem with the Collector failing to find AWS credentials. You can create a new User in your AWS account's IAM with the following policy attached: https://aws-otel.github.io/docs/setup/permissions
Then, you should be able to use the access key and secret key of that user to get the collector to send data to AWS. You can pass them in via AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
environment variables as described in the docs. If you're having further issues with the collector please open them in the collector repo, thanks!
This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled
This issue was closed because it has been marked as stale for 30 days with no activity.
My package.json is the following:
My serverless.yml is the following:
Handler is trying to use the similar sample:
However, I am getting the following error:
The tracer is: