Skip to content

Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use#4562

Merged
aabmass merged 36 commits intoopen-telemetry:mainfrom
DylanRussell:refactor_blrp
May 12, 2025
Merged

Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use#4562
aabmass merged 36 commits intoopen-telemetry:mainfrom
DylanRussell:refactor_blrp

Conversation

@DylanRussell
Copy link
Contributor

@DylanRussell DylanRussell commented Apr 25, 2025

Description

Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use.

Move BatchProcessor into a new _shared_internal folder in the SDK, so both processors can make use of it.

In a follow up PR, I will update BatchSpanRecordProcessor to use this new class.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added unit tests

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

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

@DylanRussell DylanRussell requested a review from a team as a code owner April 25, 2025 17:54
@xrmx xrmx moved this to Ready for review in Python PR digest Apr 29, 2025
@DylanRussell
Copy link
Contributor Author

DylanRussell commented Apr 30, 2025

Nevermind.. was able to get the test working

Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

Nice, just a few comments on design and typing

Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

Awesome!

@aabmass aabmass merged commit 037e9cb into open-telemetry:main May 12, 2025
480 of 481 checks passed
@github-project-automation github-project-automation bot moved this from Ready for review to Done in Python PR digest May 12, 2025
mxiamxia pushed a commit to aws-observability/aws-otel-python-instrumentation that referenced this pull request Oct 30, 2025
…58b0 (#524)

This PR updates the upstream OpenTelemetry Python dependency to its
September 2025 release; Upgrading from version 1.33.1/0.54b1 to
1.37.0/0.58b0.

It also resolves several conflicts between the following OTel PRs and
existing ADOT patches:

starlette: Remove maximum version constraint  

open-telemetry/opentelemetry-python-contrib#3456

Make a BatchProcessor class which both BatchSpanRecordProcessor and
BatchLogRecordProcessor can use
open-telemetry/opentelemetry-python#4562

Make exporter timeout encompass retries/backoffs, add jitter to
backoffs, cleanup code a bit
open-telemetry/opentelemetry-python#4564

Update BatchSpanProcessor to use new BatchProcessor class 
open-telemetry/opentelemetry-python#4580

Fix issue where deadlock can occur over logging._lock 
open-telemetry/opentelemetry-python#4636

Tests Performed

tox -e lint
tox -e spellcheck
tox -e 3.9-test-aws-opentelemetry-distro
tox -e 3.10-test-aws-opentelemetry-distro
tox -e 3.11-test-aws-opentelemetry-distro
tox -e 3.12-test-aws-opentelemetry-distro
tox -e 3.13-test-aws-opentelemetry-distro

Smoke/contract tests: ./gradlew
appsignals-tests:contract-tests:contractTests

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
liustve added a commit to aws-observability/aws-otel-python-instrumentation that referenced this pull request Feb 4, 2026
Automated update of OpenTelemetry dependencies.

**Build Status:** ❌
[failure](https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/21465140126)

**Updated versions:**
- [OpenTelemetry
Python](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.39.1):
1.39.1
- [OpenTelemetry
Contrib](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.60b1):
0.60b1
-
[opentelemetry-sdk-extension-aws](https://pypi.org/project/opentelemetry-sdk-extension-aws/2.1.0/):
2.1.0
-
[opentelemetry-propagator-aws-xray](https://pypi.org/project/opentelemetry-propagator-aws-xray/1.0.2/):
1.0.2

**Upstream releases with breaking changes:**
Note: the mechanism to detect upstream breaking changes is not perfect.
Be sure to check all new releases and understand if any additional
changes need to be addressed.

**opentelemetry-python:**
- [Version
1.35.0/0.56b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.35.0)

**opentelemetry-python-contrib:**
- [Version
1.34.0/0.55b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.55b0)

*Description of changes:*

- Un-reverts changes done in this PR:
#531

- Removed patches for Bedrock following the changes applied in these
PRs:
open-telemetry/opentelemetry-python-contrib#3544,
open-telemetry/opentelemetry-python-contrib#3548,
open-telemetry/opentelemetry-python-contrib#3875,
open-telemetry/opentelemetry-python-contrib#3990

- Removes patches for Secrets Manager, SNS, and Step Functions following
the changes applied in these PRs:
open-telemetry/opentelemetry-python-contrib#3734,
open-telemetry/opentelemetry-python-contrib#3737,
open-telemetry/opentelemetry-python-contrib#3765,

- Removes patches for Starlette following the changes applied in this
PR:
open-telemetry/opentelemetry-python-contrib#3456

- Changes imports and implementation of `OTLPAwsLogExporter`,
`AwsCloudWatchOtlpBatchLogRecordProcessor`, and
`CompactConsoleLogExporter` following these PRs:
open-telemetry/opentelemetry-python#4580,
open-telemetry/opentelemetry-python#4535,
open-telemetry/opentelemetry-python#4562,
open-telemetry/opentelemetry-python#4647,
open-telemetry/opentelemetry-python#4676

- Removes a few AWS semantic conventions from `_aws_attribute_keys ` and
replaces them with equivalent ones from upstream following the changes
in this PR:
open-telemetry/opentelemetry-python#4791

- Fix Lambda instrumentation test to set `AWS_LAMBDA_FUNCTION_NAME` env
var following changes in:
open-telemetry/opentelemetry-python-contrib#3183

- Adds a few more contract tests to verify upstream's botocore
instrumentation library


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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Pierce <thp@amazon.com>
Co-authored-by: Steve Liu <liustve@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants