opentelemetry-lambda
opentelemetry-lambda copied to clipboard
Error on Lambda test: no such file or directory
I'm getting an error in my Lambda when including the self-built lambda layer:
{
"errorMessage": "RequestId: 16cb64d6-a350-4939-8dd8-9148f8d934f1 Error: fork/exec /opt/extensions/opentelemetry-lambda-extension: no such file or directory",
"errorType": "Extension.LaunchError"
}
Steps:
- Makefile build
ZIP File of step1 has the content:
extensions/opentelemetry-lambda-extension
-
Makefile publish Layer is created in the account + region
-
adding layer to a lambda function with hello-world content with NodeJS Runtime 12
-
adding the
collector.yamlin the root of the function content:
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:55680
exporters:
awsxray:
awsemf:
service:
pipelines:
traces:
receivers: [otlp]
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [awsemf]
-
setting env variable:
OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/var/task/collector.yaml -
hit test
Hi, today (very similar test) - i think it is same error:
START RequestId: 14ad8ab6-ed52-446d-9c2d-d87646432750 Version: $LATEST
Launching Opentelemetry Lambda extension, version: v0.1.0
Reading config from file: /var/task/collector.yaml
2021-03-21T15:23:12.864Z INFO service/service.go:411 Starting InProcess Collector... {"Version": "v0.1.0", "GitHash": "eccf0191be24c301541085c1022003d8c38c0d57", "NumCPU": 2}
2021-03-21T15:23:12.865Z INFO service/service.go:255 Setting up own telemetry...
2021-03-21T15:23:12.865Z INFO service/service.go:292 Loading configuration...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb721e6]
goroutine 22 [running]:
go.opentelemetry.io/collector/config.validateReceivers(...)
go.opentelemetry.io/[email protected]/config/config.go:626
go.opentelemetry.io/collector/config.ValidateConfig(0x0, 0xc0003cf860, 0xc00027c090, 0x0)
go.opentelemetry.io/[email protected]/config/config.go:487 +0x26
go.opentelemetry.io/collector/service.(*Application).setupConfigurationComponents(0xc000124300, 0x155c8c8, 0xc00003a028, 0xc000136950, 0x0, 0x3)
go.opentelemetry.io/[email protected]/service/service.go:297 +0x1a5
go.opentelemetry.io/collector/service.(*Application).execute(0xc000124300, 0x155c8c8, 0xc00003a028, 0xc000136950, 0x0, 0x0)
go.opentelemetry.io/[email protected]/service/service.go:429 +0x47e
go.opentelemetry.io/collector/service.New.func1(0xc00036f900, 0xc000136a10, 0x0, 0x1, 0x0, 0x0)
go.opentelemetry.io/[email protected]/service/service.go:165 +0xa7
github.com/spf13/cobra.(*Command).execute(0xc00036f900, 0xc0001369f0, 0x1, 0x1, 0xc00036f900, 0xc0001369f0)
github.com/spf13/[email protected]/command.go:852 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc00036f900, 0xc00038a000, 0x4425f6, 0x130c1b8)
github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:897
go.opentelemetry.io/collector/service.(*Application).Run(...)
go.opentelemetry.io/[email protected]/service/service.go:482
main.(*InProcessCollector).start.func2(0xc00038d2c0, 0xc000136960)
github.com/open-telemetry/opentelemetry-lambda/collector/collector.go:117 +0x69
created by main.(*InProcessCollector).start
github.com/open-telemetry/opentelemetry-lambda/collector/collector.go:115 +0x2ae
EXTENSION Name: collector State: Started Events: []
END RequestId: 14ad8ab6-ed52-446d-9c2d-d87646432750
REPORT RequestId: 14ad8ab6-ed52-446d-9c2d-d87646432750 Duration: 1393.49 ms Billed Duration: 1394 ms Memory Size: 256 MB Max Memory Used: 42 MB
RequestId: 14ad8ab6-ed52-446d-9c2d-d87646432750 Error: exit status 2
Extension.Crash
Collector extension in opentelemetry-lambda repo currently only has otlp receiver and exporter, and no any processor included. If need components other than them you have to build your custom Collector extension layer. Please refer AWS solution: https://github.com/aws-observability/aws-otel-collector/tree/main/pkg/lambdacomponents https://github.com/aws-observability/aws-otel-lambda/blob/main/patch-upstream.sh#L3-L7
Hi @michaelfecher, Can you please confirm if this have addressed your question :-)