Skip to content
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

AWS Lambda not reporting URL #221

Open
rajbeard opened this issue Apr 16, 2020 · 12 comments
Open

AWS Lambda not reporting URL #221

rajbeard opened this issue Apr 16, 2020 · 12 comments

Comments

@rajbeard
Copy link

Using SDK with Django.

The lambda function traces don't report the URL on the top level segment, looking at the raw data it seems that the URL is being set in the subsegments. Is there any way to call put_http_meta on the root Lambda segment through application code?

I tried extending the middleware, grabbing the current segment and setting the http metadata, but this returns the facade segment, which can't be mutated.

@shengxil
Copy link
Contributor

Hi @rajbeard
Thanks for bringing up this issue. The Lambda root segment is indeed immutable. There is no way to modify it. The only place to put http metadata is on the custom subsegment. It is indexed and queryable as same. Would you mind sharing your use case that only works on segment level?

@rajbeard
Copy link
Author

Hey @shengxil
We manage multiple content oriented websites. It's useful for us to be able to quickly see which pages are causing poor performance, so that we can identify common chokepoints and make tweaks.

The XRay console is not reporting the URLs (or any of the other metadata) for each page. Instead, they are just blank. Locally, the URLs are correctly displayed inside of the console. Looking at the data payloads, the difference seems to be because the top level segment has that metadata in local development environments.

@shengxil
Copy link
Contributor

Hi rajbeard, that is indeed a valid concern. Unfortunately at this moment we don't have any workaround to put HTTP URL at the Lambda root segment. We will work with AWS Lambda team to address and solve this issue. Please stay tuned with us.

@levesquejf
Copy link
Contributor

@shengxil Any updates on this? Thanks.

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in next 7 days. Thank you for your contributions.

@stale stale bot added the stale label Jan 8, 2022
@sthuber90
Copy link

@shengxil is any workaround available? It's been a bit, since this issue was raised. I have a similar problem with HTTP API Gateway that path, URL and method do not get detected

@duc2019
Copy link

duc2019 commented May 30, 2023

Recently we migrate our application to Lambda Urls and stop using API Gateways, and find out xray stop showing Method and Url for traces.

  • Active tracing is enabled
  • The IAM role has xray:* permission
  • We can see Method and URL at the service segment after we open the trace (aws-xray-sdk-python added them)
  • The Method and URL is empty on the trace list
  • We can't filter traces by method or url

Looks like AWS Lambda Urls did not report Method and URL to XRay like what API Gateways did, and there is noway to call put_http_meta on the root segment.
One solution is adding annotation like #348 and use it instead of http meta, but it's not very convenient.
If you know any workround please tell us.

@wangzlei
Copy link
Contributor

wangzlei commented Jun 5, 2023

Thanks for raising this issue. If you can provide the xray trace raw data after using Lambda URL it would be great helpful.
We can investigate whether there is workaround or X-Ray should improve trace summary.

@duc2019
Copy link

duc2019 commented Jun 5, 2023

Thanks for raising this issue. If you can provide the xray trace raw data after using Lambda URL it would be great helpful. We can investigate whether there is workaround or X-Ray should improve trace summary.

Hello, this is the raw data of our http server using lambda urls standalone, some information are masked.

xray-lambda-urls.txt

There are URL and HTTP Method metadata in the Invocation segment, it's added from aws-xray-sdk-python, the root segment has none http metadata. And the trace list only recognize http metadata in root segment.

01

We have raised a ticket to AWS support last week, they confirm Lambda URLs did not report http metadata currently, but they will add this to their feature request list.

@wangzlei
Copy link
Contributor

wangzlei commented Jun 6, 2023

Forward this question to AWS Lambda monitoring.
Currently user can only filter resource_arn instead.

@vlechemin
Copy link

Hello, do you have any update on this? Working with lambdas behind HTTP API Gateway is difficult without this.
Thanks

@lobeck
Copy link

lobeck commented Apr 23, 2024

Similarily it's pretty annoying when working with Lambda Function URLs, as we can not see the called path from the overview page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants