Skip to content

Conversation

lukeina2z
Copy link
Contributor

Description

This PR adds support for the AWS_LAMBDA_RESOURCE_MAPPING_ID semantic convention attribute in the AWS Lambda SDK instrumentation library.

https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/aws.md#amazon-lambda-attributes

It also introduces the following two experimental attributes. Work is currently underway to add these keys to the AWS section of the Semantic Conventions registry:

aws.lambda.function.arn
aws.lambda.function.name

Name is extracted from request object.
ARN is extracted from response object.
Resource Mapping ID is extracted from both request and response objects. This behavior is covered by unit tests.

Backward Compatibility
This change is backward compatible. It only adds instrumentation for additional AWS resources and does not modify existing behavior in the auto-instrumentation library.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added new unit tests (passing).

Verified with:
tox -e py312-test-instrumentation-botocore
tox -e spellcheck
tox -e lint-instrumentation-botocore
tox -e ruff

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…S Lambda SDK

This PR adds support for the AWS_LAMBDA_RESOURCE_MAPPING_ID semantic convention attribute in the AWS Lambda SDK instrumentation library.

https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/aws.md#amazon-lambda-attributes

It also introduces the following two experimental attributes. Work is currently underway to add these keys to the AWS section of the Semantic Conventions registry:

aws.lambda.function.arn
aws.lambda.function.name

Name is extracted from request object.
ARN is extracted from response object.
Resource Mapping ID is extracted from both request and response objects. This behavior is covered by unit tests.

Tests
Added new unit tests (passing).

Verified with:
tox -e py312-test-instrumentation-botocore
tox -e spellcheck
tox -e lint-instrumentation-botocore
tox -e ruff

Backward Compatibility
This change is backward compatible. It only adds instrumentation for additional AWS resources and does not modify existing behavior in the auto-instrumentation library.
@lukeina2z lukeina2z changed the title Add AWS_LAMBDA_RESOURCE_MAPPING_ID Semantic Convention Support for AWS Lambda SDK botocore: Add AWS_LAMBDA_RESOURCE_MAPPING_ID Semantic Convention Support for AWS Lambda SDK Sep 30, 2025
@lukeina2z lukeina2z requested a review from a team as a code owner September 30, 2025 22:50
@xrmx
Copy link
Contributor

xrmx commented Oct 1, 2025

@lukeina2z @yiyuan-he thanks for your PRs and reviews, what do you think on being listed as component owner for the botocore instrumentation since you seem to have an interest in it?

@yiyuan-he
Copy link

@xrmx Thanks Riccardo, I'd be happy come onboard as a component owner!

@lukeina2z
Copy link
Contributor Author

@lukeina2z @yiyuan-he thanks for your PRs and reviews, what do you think on being listed as component owner for the botocore instrumentation since you seem to have an interest in it?

I am happy to contribute. Let's move forward.

@xrmx xrmx moved this to Ready for review in @xrmx's Python PR digest Oct 3, 2025
@xrmx
Copy link
Contributor

xrmx commented Oct 3, 2025

@lukeina2z @yiyuan-he thanks for your PRs and reviews, what do you think on being listed as component owner for the botocore instrumentation since you seem to have an interest in it?

I am happy to contribute. Let's move forward.

Thanks, please approve #3806

Copy link

@yiyuan-he yiyuan-he left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

3 participants