observability-best-practices
observability-best-practices copied to clipboard
The lambda function failed
I follow the guide https://docs.aws.amazon.com/prometheus/latest/userguide/integrating-cw-firehose.html to setup the solution with CDK. All resources can created successfully. When I create a Metric Stream for the firehose created by CDK.
I got the following error message when calling the lambda from firehose.
2024/03/11 07:09:34 { "errorMessage": "invalid character 'Þ' looking for beginning of value", "errorType": "SyntaxError", "stackTrace": [ { "path": "github.com/aws/[email protected]/lambda/errors.go", "line": 39, "label": "lambdaPanicResponse" }, { "path": "github.com/aws/[email protected]/lambda/invoke_loop.go", "line": 116, "label": "callBytesHandlerFunc.func1" }, { "path": "runtime/panic.go", "line": 884, "label": "gopanic" }, { "path": "lambda/main.go", "line": 84, "label": "HandleRequest" }, { "path": "reflect/value.go", "line": 586, "label": "Value.call" }, { "path": "reflect/value.go", "line": 370, "label": "Value.Call" }, { "path": "github.com/aws/[email protected]/lambda/handler.go", "line": 293, "label": "reflectHandler.func2" }, { "path": "github.com/aws/[email protected]/lambda/invoke_loop.go", "line": 119, "label": "callBytesHandlerFunc" }, { "path": "github.com/aws/[email protected]/lambda/invoke_loop.go", "line": 75, "label": "handleInvoke" }, { "path": "github.com/aws/[email protected]/lambda/invoke_loop.go", "line": 39, "label": "startRuntimeAPILoop" }, { "path": "github.com/aws/[email protected]/lambda/entry.go", "line": 106, "label": "start" }, { "path": "github.com/aws/[email protected]/lambda/entry.go", "line": 69, "label": "StartWithOptions" }, { "path": "github.com/aws/[email protected]/lambda/entry.go", "line": 45, "label": "Start" }, { "path": "lambda/main.go", "line": 119, "label": "main" }, { "path": "runtime/proc.go", "line": 250, "label": "main" }, { "path": "runtime/asm_amd64.s", "line": 1598, "label": "goexit" } ] }
hey @gaussye
Can you check if the output format from CW metrics stream is JSON and not Open Telemetry as that might explain this issue?