open-telemetry / open-telemetry/opentelemetry-java-instrumentation

Buffer javaagent logs emitted before logging initialization

Open
#19,898 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs triage
Dominant language
Java
Stars
2.6k
Forks
1.2k
Avg merge
2d 16h
Merged PRs (30d)
214

Description

Is your feature request related to a problem? Please describe.

Early javaagent code runs before logging is initialized, so components such as ConfigurationFile and #19584 maintain separate deferred-log state.

Describe the solution you'd like

Add bounded, thread-safe buffering to InternalLogger. Flush buffered records when the selected logger is initialized, while handling disabled or failed logging and avoiding premature JUL initialization.

Describe alternatives you've considered

Keep component-specific queues, as in #19584.

Additional context

Raised in https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/19584#discussion_r3871216351.

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading InternalLogger and the deferred-log state in ConfigurationFile, then inspect the discussion and implementation context from PR #19584. Define the buffering and initialization interactions before changing them. Done means bounded, thread-safe records are flushed after logger initialization while disabled or failed logging and premature JUL initialization are handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.