Skip to content

fix(structlog): preserve existing processors#4844

Open
hsusul wants to merge 1 commit into
open-telemetry:mainfrom
hsusul:fix/structlog-preserve-existing-processor
Open

fix(structlog): preserve existing processors#4844
hsusul wants to merge 1 commit into
open-telemetry:mainfrom
hsusul:fix/structlog-preserve-existing-processor

Conversation

@hsusul

@hsusul hsusul commented Jul 20, 2026

Copy link
Copy Markdown

Description

Preserve an application-configured StructlogProcessor when instrumenting and uninstrumenting Structlog.

Previously, instrumentation could add a duplicate processor when one was already configured. Uninstrumentation then removed processors by type, which could remove the application-owned processor as well.

The instrumentor now avoids duplicate insertion and removes only the exact processor instance it created.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change
  • This change requires a documentation update

How Has This Been Tested?

  • Oldest supported Structlog package test environment
  • Latest supported Structlog package test environment
  • Focused regression tests covering duplicate insertion and ownership during uninstrumentation
  • Structlog package lint
  • Ruff and Ruff formatting checks
  • License-header check

The root uv sync --frozen --all-packages command could not complete because the local system lacks the MySQL/MariaDB development libraries required to build mysqlclient. This does not affect the Structlog package test environments.

Does This PR Require a Core Repo Change?

  • Yes
  • No

Checklist:

  • Followed the style guidelines of this project
  • Changelog fragment will be added after the PR number is assigned
  • Unit tests have been added
  • Documentation has been updated

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant