-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opentelemetry-instrumentation-aws-lambda | Invalid type NoneType for attribute 'http.user_agent' value. #1780
Comments
Feel free to send a pull request.
|
@srikanthccv I need some insights about the best way here. if lambda_event.get(“version”) == “2.0":
_set_api_gateway_v2_proxy_attributes(lambda_event, span)
else:
_set_api_gateway_v1_proxy_attributes(lambda_event, span) Do you think it’s best that I keep this behavior and only add some checking inside the Or should I change the behavior by changing In addition, I also can add an The problem (The second way) is the current Lambda functions behind the ALB will not have any attributes, even attributes like The first way is more like a stable way, but I need to add a couple of Let me know what you think. Thanks. |
You mentioned a lot of lambda and AWS-specific detail I do not understand. What I could tell is that warning originates from the package, and it's because of |
Thank you. I made those changes. Now, waiting for EasyCLA. Let me know if I need to do anything in between. UPDATE: @srikanthccv The EasyCLA is OK now. |
Environment:
I'm using
opentelemetry-instrumentation-aws-lambda
to instrument the Lambda function behind the API Gateway (V2).Python==3.9
AWS-OTEL Lmabda Layer == arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-python-amd64-ver-1-17-0:1
fastapi==0.73.0
opentelemetry-sdk==1.17.0
Environment variables:
OTEL Config yaml:
Steps to reproduce
What is the expected behavior?
There shouldn't be any Warning logs in the Lambda logs.
What is the actual behavior?
I'm seeing couple of Warning in the lambda logs.
Additional context
I'm interested to open a PR if possible to add some logic here preventing None values being set as attributes: https://github.com/open-telemetry/opentelemetry-python-contrib/blob/46e4b1da44c534fed8e1002899e9e41e6d668018/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py#LL232C3-L232C3
Also, if there is a way to disable Tracing/Warning Logs it would be helpful, I couldn't find a way to do that.
Another related discussion: open-telemetry/opentelemetry-python#3293
Thanks.
The text was updated successfully, but these errors were encountered: