Description
Is your feature request related to a problem?
No.
Describe the solution you'd like
Python AwsLambdaInstrumentor attribute settings are not consistent with the latest faas semconv. Specifically, I think these instrumentor changes are needed:
ResourceAttributes.FAAS_ID
-->ResourceAttributes.CLOUD_RESOURCE_ID
SpanAttributes.FAAS_EXECUTION
-->SpanAttributes.FAAS_INVOCATION_ID
For this solution, change these set_attribute calls. Make special note in the release notes that this is breaking. This is not additive like #2368.
Describe alternatives you've considered
I've thought about and brought up 2 other ideas on Slack:
Idea (A)
The Python AwsLambdaInstrumentor upgrades to a newer semconv version. Would it need to be an opt-in for users like for http instrumentation? (i.e. this recent issue) Would this need to be presented to an Otel Spec project group? (i.e. this issue)
Idea (B)
The Python AwsLambdaInstrumentor gets request/response hooks implemented like in NodeJS. This would allow users to add any attributes they like. I see this was requested, discussed in Otel Spec, PR'd (rejected), discussed at faas project sig, alternatively PR'd as a SpanProcessor requirement (rejected), and brought up again in Slack. I haven't found any other updates since May 2023.
In this otel-faas thread, it was mentioned that the faas attributes are not stable so a breaking change would be ok. Therefore we could implement the quick, in-place change.
Additional context