Skip to content

Conversation

liustve
Copy link
Contributor

@liustve liustve commented Jul 3, 2025

Description of changes:
This PR cleans up botocore usages in EMF and Sigv4 exporters and migrates them to the _utils class.

  • Added get_aws_session() function in _utils.py to handle botocore session creation

  • Refactored get_aws_region() to properly handle AWS_REGION and AWS_DEFAULT_REGION environment variables

  • Added IS_BOTOCORE_INSTALLED flag to prevent runtime errors for customers not using botocore-dependent features

  • Added _create_aws_otlp_exporter() function to prevent runtime errors from instantiating AWS OTLP exporter creation if the user does not have botocore installed

  • Changed OTLP log exporter to allow optional constructor parameters for x-aws-log-group and x-aws-log-stream headers to consolidate it with EMF exporter

Force flush race condition: Added force flush implementation to prevent race conditions in AwsBatchLogRecordProcessor as here: #407

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@liustve liustve requested a review from a team as a code owner July 3, 2025 17:21
@liustve liustve changed the title [WIP] Consolidate botocore usage in EMF and Sigv4 Exporters Consolidate botocore usage in EMF and Sigv4 Exporters Jul 3, 2025
@liustve liustve merged commit 7e430b6 into main Jul 3, 2025
13 checks passed
@liustve liustve deleted the consolidate-botocore-usage branch July 3, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants