Functionbeat missing package io/fs

Hello @Edoardo_Tenani,

Thanks a lot for your advice, it worked for the deployment part. functionbeat is properly deployed on GCP cloud function with Go 1.16.

Unfortunately, after sending some traffic through the cloud function I still get the panic crash error. Same behaviour as before, the first message is properly delivered to my Elastic cloud cluster. I can see it in kibana. The second message always makes functionbeat to crash

FATAL [functionbeat] instance/beat.go:171 Failed due to panic. {"panic": "name version already used", "stack": "pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance.Run.func1.1\n\t/workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance/beat.go:172\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:965\npubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.panicErr\n\t/workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/registry.go:257\npubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.(*Registry).doAdd\n\t/workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/registry.go:159\npubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.addVar\n\t/workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/metrics.go:225\npubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.NewString\n\t/workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/metrics.go:170\npubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance.Run.func1\n\t/workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance/beat.go:182\npubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance.Run\n\t/workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance/beat.go:197\npubsub.RunPubSub\n\t/workspace/src/pubsub/pubsub.go:35\nreflect.Value.call\n\t/usr/local/go/src/reflect/value.go:476\nreflect.Value.Call\n\t/usr/local/go/src/reflect/value.go:337\ngithub.com/GoogleCloudPlatform/functions-framework-go/funcframework.runUserFunctionWithContext\n\t/workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/framework.go:202\ngithub.com/GoogleCloudPlatform/functions-framework-go/funcframework.runBackgroundEvent\n\t/workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/events.go:101\ngithub.com/GoogleCloudPlatform/functions-framework-go/funcframework.handleEventFunction\n\t/workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/framework.go:169\ngithub.com/GoogleCloudPlatform/functions-framework-go/funcframework.registerEventFunction.func1\n\t/workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/framework.go:136\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2049\nnet/http.(*ServeMux).ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2428\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2867\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1932"}

I'm facing this issue since 7.11 unfortunatly, I cannot manage to make functionbeat to work properly. Issue has been raised about it : GCP/FunctionBeat Errors [cannot find matching process for pid=1, name version already used] · Issue #25596 · elastic/beats · GitHub but it didn't get much love for the moment :frowning:

Maybe you can try to revive it otherwise thanks a lot for your help.

Jérôme