You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#collector.yaml in the root directory#Set an environment variable 'OPENTELEMETRY_COLLECTOR_CONFIG_FILE' to '/var/task/collector.yaml'receivers:
otlp:
protocols:
grpc:
endpoint: "localhost:4317"http:
endpoint: "localhost:4318"exporters:
logging:
awsxray:
service:
pipelines:
traces:
receivers: [otlp]exporters: [awsxray]metrics:
receivers: [otlp]exporters: [logging]telemetry:
metrics:
address: localhost:8888
This recommends the now deprecated OPENTELEMETRY_COLLECTOR_CONFIG_FILE. This should be OPENTELEMETRY_COLLECTOR_CONFIG_URI.
The logging export is both deprecated and borks the layer.
This config produces:
{"level": "warn","ts": 17737229504.1134509,"logger": "NewCollector","msg": "The OPENTELEMETRY_COLLECTOR_CONFIG_FILE environment variable is deprecated. Please use OPENTELEMETRY_COLLECTOR_CONFIG_URI instead."}{"level": "warn","ts": 1737229504.3452542,"logger": "lifecycle.manager","msg": "Failed to start the extension","error": "failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):\n\nerror decoding 'exporters': the logging exporter has been deprecated, use the debug exporter instead"}{"level": "info","ts": 1737229504.3453238,"msg": "done","error": "failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):\n\nerror decoding 'exporters': the logging exporter has been deprecated, use the debug exporter instead; 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: decoding failed due to the following error(s):\n\nerror decoding 'exporters': the logging exporter has been deprecated, use the debug exporter instead"},{"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\""}]}
Describe the bug
The documentation for the otel.yaml example file is outdated when using aws-otel-collector-arm64-ver-0-115-0:2.
Steps to reproduce
Run a lambda with the basic config recommended by AWS Observability and aws-otel-collector-arm64-ver-0-115-0:2 in the extension layer.
OPENTELEMETRY_COLLECTOR_CONFIG_FILE
. This should beOPENTELEMETRY_COLLECTOR_CONFIG_URI
.This config produces:
Ending with:
My lambda does run after removing the logging export from the otel.yaml.
What did you expect to see?
I expected the AWS Observability otel config file documentation to not cause a crash.
What did you see instead?
The AWS Observability lambda otel config file documentation caused a crash.
What version of collector/language SDK version did you use?
aws-otel-collector-arm64-ver-0-115-0:2
What language layer did you use?
Go, the bad AWS Observability otel config crashes the lambda before my code runs.
The text was updated successfully, but these errors were encountered: