-
Notifications
You must be signed in to change notification settings - Fork 889
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
Consider making faas.id a span attribute instead of a resource attribute #1261
Comments
Indeed all the FaaS resource attributes also caused problems at Dynatrace, to the point where we patched our SDKs to allow adding resource attributes until before the first span is sent. |
That would be perfect for all/most cloud/faas attributes. For example, if I wanted to add |
Can somebody provide insight on how should we deal with the yaml files? Should I just duplicate the attributes in resources & traces? |
I would say we keep it as resource but add a note in the markdown that they may also be sent as span attributes. We may later want to add support for the generator to mark an attribute as being able to be put on a span. |
BTW @anuraaga, @alolita or someone from else AWS: are there any plans that AWS Lambda will improve the situation here? It is quite inconvenient that the ARN is not available before the first request is handled. For example, you can not report JVM memory metrics associated with an ARN before the first request hits the lambda (e.g. provisioned concurrency cases). |
@Oberon00 Thanks for the callout - I tried filing a ticket with the lambda team to see if they can provide ARN as an environment variable. We'll see how it goes, I wouldn't expect it anytime soon though. |
Though after reading #1280 I have a feeling my ticket will be rejected :) I guess the same execution environment can be used with different ARN's because of the aliases. |
@anuraaga The (primary?) function name is already known from an environment variable on AWS, as is the region. The only thing missing to form an ARN is the account ID. |
@anuraaga Any news from the AWS side, on the availability of the account ID or full ARN at startup? |
@Oberon00 It's a feature request, and apparently there are some corner cases so not sure if / when it'll be implemented unfortunately. |
+1 to this. Shall we proceed? I'd like to have this assigned (or work on it myself) so we can make progress ;) |
Just a note: this problem can also be solved by doing #1298 |
discussed at the maintainers mtg today...desire is to move this to after ga @Oberon00 comment if you would see this as required for ga |
I'm fine with after-ga. |
I believe this is actually kind of resolved now, with faas.id being explicitly allowed as a span attribute as well. This was done at https://github.com/open-telemetry/opentelemetry-specification/pull/1781/files#diff-1ef1d72af0336c2273408806365fd2621ab7e6d65b664798ce1c842250ce0e8eR33-R37 and again clarified/adapted further in #2502 |
What are you trying to achieve?
Currently
faas.id
is a resource attribute. In AWS Lambda functions its value (lambda function ARN) is only available as a property of the AWS lambda context passed to the function, so it's impossible to detect this part just from the environment.The text was updated successfully, but these errors were encountered: