-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate Lambda ResourceId or FaasId for the child spans (#104)
*Description of changes:* For Lambda case, the Lambda resource attribute only exists on Handler span, it needs to be propagated to its child spans. This PR includes the changes, 1. if parent span contains `cloud.resource_id` or `faas.i` but not in child span, child span will be propagated with one of these attribute from parent. 2. if both exist `cloud.resource_id` takes priority 3. if none of two Lambda resource attrs exists, do nothing. *Test:* **Hander Span** ``` 2024-10-16T17:53:20.216Z | 'faas.id': 'arn:aws:lambda:us-west-1:889414516288:function:aws-opentelemetry-distro-nodejs', -- | -- | 2024-10-16T17:53:20.216Z | 'cloud.account.id': '889414516288', | 2024-10-16T17:53:20.216Z | 'aws.is.local.root': true, | 2024-10-16T17:53:20.216Z | 'aws.local.service': 'aws-opentelemetry-distro-nodejs', | 2024-10-16T17:53:20.216Z | 'aws.local.operation': 'aws-opentelemetry-distro-nodejs/Handler', ``` **Child Span** ``` | 2024-10-16T17:53:20.194Z | attributes: { -- | -- | -- | 2024-10-16T17:53:20.194Z | 'rpc.system': 'aws-api', | 2024-10-16T17:53:20.194Z | 'rpc.method': 'ListBuckets', | 2024-10-16T17:53:20.194Z | 'rpc.service': 'S3', | 2024-10-16T17:53:20.194Z | 'aws.is.local.root': false, | 2024-10-16T17:53:20.194Z | 'faas.id': 'arn:aws:lambda:us-west-1:889414516288:function:aws-opentelemetry-distro-nodejs', | 2024-10-16T17:53:20.194Z | 'aws.local.operation': 'aws-opentelemetry-distro-nodejs/Handler', ``` By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
Showing
4 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters