Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect AgentLogEmitterProvider global during OpenTelemetryInstaller #5088

Merged
merged 4 commits into from
Jan 13, 2022

Conversation

breedx-splk
Copy link
Contributor

I was having some challenges around #5048 related to this.

Instrumentation uses the global holder for the log emitter. The LogEmitterProvider from the autoconfigured SDK was not being stitched to the global holder during install time, so instrumentations were not yet able to actually emit logs. This remedies that.

I confirmed that this this change allows logs to be exported (when the logs exporter is set).

Thanks to @mateuszrzeszutek for help spelunking to find this disconnect.

@breedx-splk breedx-splk requested a review from a team as a code owner January 12, 2022 19:04
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

👍

@trask
Copy link
Member

trask commented Jan 12, 2022

@breedx-splk I pushed a commit 🤞

@breedx-splk
Copy link
Contributor Author

@breedx-splk I pushed a commit 🤞

Excellent, thanks!

@trask trask added this to the v1.10.0 milestone Jan 13, 2022
@trask
Copy link
Member

trask commented Jan 13, 2022

payara smoke test has failed a couple of times, the log file is 600mb full of:

    App - STDERR: [#|2022-01-13T00:33:44.512+0000|SEVERE|Payara 5.2020.6||_ThreadID=30;_ThreadName=Logging output pump;_TimeMillis=1642034024512;_LevelValue=1000;|
    App - STDERR:   [otel.javaagent 2022-01-13 00:33:44:512 +0000] [Logging output pump] DEBUG io.opentelemetry.sdk.logs.SdkLogEmitterProvider - LogEmitter requested without instrumentation name.|#]

I'm going to push a commit to default the instrumentation name to ROOT when the logger name is null/empty.

@trask trask merged commit 963b5cc into open-telemetry:main Jan 13, 2022
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
…pen-telemetry#5088)

* during install, hook up the log emitter provider for instrumentation to use.

* spotless

* Fix tests

* Default instrumentation name to ROOT when logger name null/empty

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants