Description
I attempted to open a ticket with the Lambda group, but they can't do anything and pointed me here. WHO DO I OPEN A TICKET WITH?
I'm trying to get ADOT to work with a lambda function using a custom collector configuration file to integrate it with AppDynamics. Lambda is trying to use the config file, but is throwing a parse error. The configuration is valid because it works with a stand-alone collector. The configuration file and the error I'm getting is below.
config.yaml
processors:
resource:
attributes:
- key: appdynamics.controller.account
action: upsert
value: "d0hi"
- key: appdynamics.controller.host
action: upsert
value: "d0hi.saas.appdynamics.com"
- key: appdynamics.controller.port
action: upsert
value: 443
batch:
timeout: 30s
send_batch_size: 90
receivers:
otlp:
protocols:
grpc:
http:
exporters:
otlphttp:
endpoint: "https://pdx-sls-agent-api.saas.appdynamics.com"
headers: {"x-api-key": "-omitted-"}
service:
pipelines:
traces:
receivers: [otlp]
processors: [resource, batch]
exporters: [otlphttp]
Output from lambda test:
Test Event Name
testtest
Response
{
"errorType": "Extension.Crash",
"errorMessage": "RequestId: 47dca6c1-8849-4311-8bf2-1be9608dc881 Error: exit code 0"
}
Function Logs
.localdomain:53612"}
{"level":"info","ts":1720447363.189256,"logger":"telemetryAPI.Client","msg":"Subscribing","baseURL":"http://127.0.0.1:9001/2022-07-01/telemetry "}
TELEMETRY Name: collector State: Subscribed Types: [Platform]
{"level":"info","ts":1720447363.194307,"logger":"telemetryAPI.Client","msg":"Subscription success","response":""OK""}
{"level":"info","ts":1720447363.1944575,"logger":"NewCollector","msg":"Using config URI from environment","uri":"/var/task/config.yaml"}
{"level":"warn","ts":1720447363.2452433,"logger":"lifecycle.manager","msg":"Failed to start the extension","error":"failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:\n\n* error decoding 'processors': unknown type: "resource" for id: "resource" (valid values: [])"}
{"level":"info","ts":1720447363.2455196,"msg":"done","error":"failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:\n\n* error decoding 'processors': unknown type: "resource" for id: "resource" (valid values: []); Post "http://127.0.0.1:9001/2020-01-01/extension/init/error\ ": net/http: invalid header field value for "Lambda-Extension-Function-Error-Type"","errorCauses":[{"error":"failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:\n\n* error decoding 'processors': unknown type: "resource" for id: "resource" (valid values: [])"},{"error":"Post "http://127.0.0.1:9001/2020-01-01/extension/init/error\ ": net/http: invalid header field value for "Lambda-Extension-Function-Error-Type""}]}
EXTENSION Name: collector State: Ready Events: [INVOKE, SHUTDOWN]
INIT_REPORT Init Duration: 315.09 ms Phase: init Status: error Error Type: Extension.Crash
{"level":"info","ts":1720447364.7850418,"msg":"Launching OpenTelemetry Lambda extension","version":"v0.39.0"}
{"level":"info","ts":1720447364.8247287,"logger":"telemetryAPI.Listener","msg":"Listening for requests","address":"sandbox.localdomain:53612"}
{"level":"info","ts":1720447364.8248098,"logger":"telemetryAPI.Client","msg":"Subscribing","baseURL":"http://127.0.0.1:9001/2022-07-01/telemetry "}
TELEMETRY Name: collector State: Already subscribed Types: [Platform]
{"level":"info","ts":1720447364.8645234,"logger":"telemetryAPI.Client","msg":"Subscription success","response":""AlreadySubscribed""}
{"level":"info","ts":1720447364.88297,"logger":"NewCollector","msg":"Using config URI from environment","uri":"/var/task/config.yaml"}
{"level":"warn","ts":1720447364.943135,"logger":"lifecycle.manager","msg":"Failed to start the extension","error":"failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:\n\n* error decoding 'processors': unknown type: "resource" for id: "resource" (valid values: [])"}
{"level":"info","ts":1720447364.943331,"msg":"done","error":"failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:\n\n* error decoding 'processors': unknown type: "resource" for id: "resource" (valid values: []); Post "http://127.0.0.1:9001/2020-01-01/extension/init/error\ ": net/http: invalid header field value for "Lambda-Extension-Function-Error-Type"","errorCauses":[{"error":"failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:\n\n* error decoding 'processors': unknown type: "resource" for id: "resource" (valid values: [])"},{"error":"Post "http://127.0.0.1:9001/2020-01-01/extension/init/error\ ": net/http: invalid header field value for "Lambda-Extension-Function-Error-Type""}]}
EXTENSION Name: collector State: Ready Events: [INVOKE, SHUTDOWN]
INIT_REPORT Init Duration: 1693.06 ms Phase: invoke Status: error Error Type: Extension.Crash
START RequestId: 47dca6c1-8849-4311-8bf2-1be9608dc881 Version: $LATEST
RequestId: 47dca6c1-8849-4311-8bf2-1be9608dc881 Error: exit code 0
Extension.Crash
END RequestId: 47dca6c1-8849-4311-8bf2-1be9608dc881
REPORT RequestId: 47dca6c1-8849-4311-8bf2-1be9608dc881 Duration: 1732.64 ms Billed Duration: 1733 ms Memory Size: 256 MB Max Memory Used: 42 MB
XRAY TraceId: 1-668bf182-1f8e270c796a72f60116cdf5 SegmentId: 6f283bc82897b4d0 Sampled: true
Request ID
47dca6c1-8849-4311-8bf2-1be9608dc881
Function ARN: arn:aws:lambda:us-east-2:631190267745:function:LayerTest