File tree 3 files changed +8
-6
lines changed
instrumentation/opentelemetry-instrumentation-aws-lambda
src/opentelemetry/instrumentation/aws_lambda
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
15
15
- Rename ` type ` attribute to ` asgi.event.type ` in ` opentelemetry-instrumentation-asgi `
16
16
([ #2300 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2300 ) )
17
+ - Rename AwsLambdaInstrumentor span attributes ` faas.id ` to ` cloud.resource_id ` , ` faas.execution ` to ` faas.invocation_id `
18
+ ([ #2372 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2372 ) )
17
19
18
20
### Added
19
21
Original file line number Diff line number Diff line change @@ -340,17 +340,17 @@ def _instrumented_lambda_handler_call( # noqa pylint: disable=too-many-branches
340
340
if span .is_recording ():
341
341
lambda_context = args [1 ]
342
342
# NOTE: The specs mention an exception here, allowing the
343
- # `ResourceAttributes.FAAS_ID ` attribute to be set as a span
343
+ # `SpanAttributes.CLOUD_RESOURCE_ID ` attribute to be set as a span
344
344
# attribute instead of a resource attribute.
345
345
#
346
346
# See more:
347
- # https://github.com/open-telemetry/opentelemetry-specification /blob/main/specification/trace/semantic_conventions/ faas.md#example
347
+ # https://github.com/open-telemetry/semantic-conventions /blob/main/docs/ faas/aws-lambda .md#resource-detector
348
348
span .set_attribute (
349
- ResourceAttributes . FAAS_ID ,
349
+ SpanAttributes . CLOUD_RESOURCE_ID ,
350
350
lambda_context .invoked_function_arn ,
351
351
)
352
352
span .set_attribute (
353
- SpanAttributes .FAAS_EXECUTION ,
353
+ SpanAttributes .FAAS_INVOCATION_ID ,
354
354
lambda_context .aws_request_id ,
355
355
)
356
356
Original file line number Diff line number Diff line change @@ -145,8 +145,8 @@ def test_active_tracing(self):
145
145
self .assertSpanHasAttributes (
146
146
span ,
147
147
{
148
- ResourceAttributes . FAAS_ID : MOCK_LAMBDA_CONTEXT .invoked_function_arn ,
149
- SpanAttributes .FAAS_EXECUTION : MOCK_LAMBDA_CONTEXT .aws_request_id ,
148
+ SpanAttributes . CLOUD_RESOURCE_ID : MOCK_LAMBDA_CONTEXT .invoked_function_arn ,
149
+ SpanAttributes .FAAS_INVOCATION_ID : MOCK_LAMBDA_CONTEXT .aws_request_id ,
150
150
ResourceAttributes .CLOUD_ACCOUNT_ID : MOCK_LAMBDA_CONTEXT .invoked_function_arn .split (
151
151
":"
152
152
)[
You can’t perform that action at this time.
0 commit comments