Skip to content

opentelemetry-exporter-otlp-common: add shared package for common OTLP utilities#5252

Open
herin049 wants to merge 11 commits into
open-telemetry:mainfrom
herin049:feat/exporter-http-common
Open

opentelemetry-exporter-otlp-common: add shared package for common OTLP utilities#5252
herin049 wants to merge 11 commits into
open-telemetry:mainfrom
herin049:feat/exporter-http-common

Conversation

@herin049

@herin049 herin049 commented May 28, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a new opentelemetry-exporter-otlp-common package to provide common utilities for OTLP Protobuf/JSON/gRPC exporters.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

uv run tox -e py314-test-opentelemetry-exporter-otlpcommon-latest

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

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

@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Jun 12, 2026
@herin049 herin049 force-pushed the feat/exporter-http-common branch from 44a17f2 to 5cb779f Compare June 16, 2026 02:36
@herin049 herin049 changed the title feat: add opentelemetry-exporter-otlp-http-common package opentelemetry-exporter-otlp-common: add shared package for common OTLP utilities Jun 16, 2026
@herin049 herin049 added exporters and removed Stale labels Jun 16, 2026
@herin049 herin049 marked this pull request as ready for review June 16, 2026 02:38
@herin049 herin049 requested a review from a team as a code owner June 16, 2026 02:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new opentelemetry-exporter-otlp-common package intended to centralize shared OTLP exporter utilities (notably OTLP/HTTP retry/compression logic and metrics aggregation/temporality helpers), and wires it into the monorepo build/test/CI configuration.

Changes:

  • Added the new opentelemetry-exporter-otlp-common distribution with internal OTLP/HTTP client + aggregation utilities and accompanying tests.
  • Integrated the new package into workspace membership, packaging lists, tox envs, and GitHub Actions test/lint jobs.
  • Added pinned test requirement sets (oldest/latest) for the new package and updated the changelog entry.

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
uv.lock Adds the new package as a workspace member and records dependency lock updates.
tox.ini Adds test/lint envs and dependency mappings for the new package.
pyproject.toml Includes/excludes the new package paths for repo-level tooling.
eachdist.ini Adds the new distribution to per-dist packaging configuration.
.github/workflows/test.yml Adds CI test jobs for the new package across Python versions/platforms.
.github/workflows/lint.yml Adds CI lint job for the new package.
.changelog/5252.added Documents the addition of the new shared OTLP utilities package.
exporter/opentelemetry-exporter-otlp-common/pyproject.toml Defines the new distribution metadata, deps, and build configuration.
exporter/opentelemetry-exporter-otlp-common/README.rst Documents installation and basic usage for the new OTLP/HTTP utilities.
exporter/opentelemetry-exporter-otlp-common/LICENSE Adds the Apache 2.0 license text for the new package directory.
exporter/opentelemetry-exporter-otlp-common/src/.../_http.py Implements OTLPHTTPClient (compression + retry/backoff + transport integration).
exporter/opentelemetry-exporter-otlp-common/src/.../_aggregation.py Implements env-driven metrics temporality + histogram aggregation selection helpers.
exporter/opentelemetry-exporter-otlp-common/src/.../__init__.py Initializes the new package module.
exporter/opentelemetry-exporter-otlp-common/src/.../version/__init__.py Introduces version metadata for the new distribution.
exporter/opentelemetry-exporter-otlp-common/src/.../py.typed Marks the package as typed for type checkers.
exporter/opentelemetry-exporter-otlp-common/tests/test_http_client.py Adds unit tests for retry, timeout, compression, and shutdown behaviors.
exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py Adds unit tests for env-driven temporality/aggregation selection.
exporter/opentelemetry-exporter-otlp-common/tests/__init__.py Test package marker for the new package.
exporter/opentelemetry-exporter-otlp-common/test-requirements.in Defines test dependency inputs for the new package.
exporter/opentelemetry-exporter-otlp-common/test-requirements.oldest.txt Pinned “oldest” resolved test dependency set for CI/tox.
exporter/opentelemetry-exporter-otlp-common/test-requirements.latest.txt Pinned “latest” resolved test dependency set for CI/tox.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread exporter/opentelemetry-exporter-otlp-common/README.rst Outdated
Comment thread tox.ini
@@ -0,0 +1,69 @@
# This file was autogenerated by uv via the following command:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't like having oldest/latest really.. I feel like it's a lot of boilerplate and some maintenance toil for not much benefit..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree that it's inconvenient to work with but I do think it is valuable in catching compatibility issues in your package. For example, unintentionally relying on a new feature/functionality added in a new minor version of a package. Also, given that these files are generated via uv pip compile I think that tools like Renovate are able to automatically regenerate these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants