GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Potentially common error when registering log record processors via AutoConfigurationCustomizer? · Issue #6599 · open-telemetry/opentelemetry-java

Potentially common error when registering log record processors via AutoConfigurationCustomizer? #6599

New issue
Copy link
New issue
Copy link
Closed
Closed
Potentially common error when registering log record processors via AutoConfigurationCustomizer?#6599
Copy link
Labels
contribfesthelp wanted

Description

@trask
trask
opened on Jul 23, 2024
Issue body actions

I only just found that the way I've been registering log processors via AutoConfigurationCustomizer is seriously flawed, and worried other people may be doing the same:

AutoConfigurationCustomizer.addLoggerProviderCustomizer(
            (builder, otelConfig) -> builder.addLogRecordProcessor(...))

Since this will register the log record processor after the BatchLogRecordProcessor, any mutations made by the log record processor may not be exported, although 99.9% (~) of the time the mutations will be exported since they will be made prior to the batch being exported.

One (non-obvious) workaround is to leverage AutoConfigurationCustomizer.addLogRecordProcessorCustomizer().

Reacted by Helen and Jack Berg

Activity

  1. jack-berg commented on Jul 23, 2024

    @jack-berg
    jack-berg
    on Jul 23, 2024
    Member
    More actions

    Right now, span processors can only mutate spans #onStart. It would only be mutations #onEnd that a BatchSpanProcessor would not see. This is proposed in https://github.com/open-telemetry/opentelemetry-specification/pulls, but not possible today.

  2. trask
    changed the title [-]Potentially common error when registering span processors via AutoConfigurationCustomizer?[/-] [+]Potentially common error when registering log record processors via AutoConfigurationCustomizer?[/+] on Jul 23, 2024
  3. trask commented on Jul 23, 2024

    @trask
    trask
    on Jul 23, 2024
    MemberAuthor
    More actions

    oh right 🙈 for some reason I found the problem in logs and assumed I had the same problem in spans but actually don't

    i've updated the title and description above to reference logs

  4. jack-berg commented on Jul 23, 2024

    @jack-berg
    jack-berg
    on Jul 23, 2024
    Member
    More actions

    Right right. Logs is definitely impacted by this.

    One option I've thought about is adding a option for SdkTracerProviderBuilder and SdkLoggerProviderBuilder to insert a processor at the front of the processing pipeline, rather than appending to the end.

  5. jack-berg
    added
    help wanted
    on Jan 6, 2025
  6. breedx-splk
    added
    contribfest
    on Apr 2, 2025
  7. onurkybsi commented on Apr 3, 2025

    @onurkybsi
    onurkybsi
    on Apr 3, 2025
    Contributor
    More actions

    Hey folks, I introduced a solution regarding this, see. I think enforcing the batch processors to the end of the processor pipeline makes sense. What do you think?

    Reacted by Gaurav Edekar
  8. jack-berg commented on Dec 19, 2025

    @jack-berg
    jack-berg
    on Dec 19, 2025
    Member
    More actions

    Solved in #7243.

  9. jack-berg
    closed this as completedon Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribfesthelp wanted

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.