AutoConfiguredOpenTelemetrySdk, when configured with ResourceProviders loses logs on startup
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- observability
Research direction
Start by reproducing the startup behavior with AutoConfiguredOpenTelemetrySdk, opentelemetry-resources, the logback appender, and the provided WireOpenTelemetry.java, DemoServerMain.java, and logback-local.xml files. Compare normal resource-provider discovery with the explicit EnvironmentResourceProvider setting; done means the several hundred pre-install queued log lines are delivered rather than only a couple.
Written by the indexing model from the issue text.
Description
Describe the bug
A clear and concise description of what the bug is.
If
- I am using
AutoConfiguredOpenTelemetrySdkinstead ofOpenTelemetrySdk - I have
opentelemetry-resourcesin my classpath - I am using logback appender.
Then I lose the logs emitted before the install command is called.
If I
- either use
OpenTelemetrySdkor don't haveopentelemetry-resourcesin my classpath
I do not have this issue.
Also if I set a debug endpoint I can see the queued items in the "pre-install" in the logback correctly drained
and if I slowly step through the "emit" loop, most of them appear. This implies some sort of race.
Steps to reproduce
If possible, provide a recipe for reproducing the error.
- docker run -p 3000:3000 -p 4317:4317 -p 4318:4318 --rm -ti grafana/otel-lgtm
- System property pointing to logback file: -Dlogging.config=/Users/mbell/git/service-otj-mvc-demo/src/main/resources/logback-local.xml
- Env Vars: OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317;OTEL_EXPORTER_OTLP_PROTOCOL=grpc
What did you expect to see?
A clear and concise description of what you expected to see.
Several hundred log lines that had been queued
What did you see instead?
A clear and concise description of what you saw instead.
A couple of log lines
What version and what artifacts are you using?
Artifacts: (e.g., opentelemetry-api, opentelemetry-sdk, which exporters, etc)
Version: (e.g., v0.4.0, 1eb551b, etc)
How did you reference these artifacts? (excerpt from your build.gradle, pom.xml, etc)
<opentelemetry-instrumentation-bom.version>2.19.0-alpha</opentelemetry-instrumentation-bom.version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-instrumentation-bom-alpha</artifactId>
<version>${opentelemetry-instrumentation-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
Environment
Compiler: Correttto 17
OS:mac
Additional context
Add any other context about the problem here.
Spring 3.5.5. I'm using "Autoconfiguration", but not instrumentation nor Spring Boot AutoConfiguration/starter
If I add -Dotel.java.enabled.resource.providers=io.opentelemetry.sdk.autoconfigure.EnvironmentResourceProvider
which from the docs implies to me this is the ONLY configured ResourceProvider. Things work
this implies to me a faulty resource provider, but I don't know how to find it
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1.1k
- Avg merge
- 5d 11h
- Merged PRs (30d)
- 41
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-telemetry/opentelemetry-java
-
`B3PropagatorExtractorMultipleHeaders` allocates when headers are missingPossibly taken @Eliot5566 claimed this today. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
open-telemetry/opentelemetry-java#9065 ·
Maintainers usually reply within 3 days
-
[incubator] ComposableProbabilitySampler does not validate ratio rangePossibly taken @eminfikret claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
open-telemetry/opentelemetry-java#9046 · 2 comments · 1 assignee ·
Maintainers usually reply within 3 days
-
PrometheusComponentProvider promotes all resource attributes when resource_constant_labels is empty ({})Possibly taken @rooks-ns claimed this 19 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-java#9014 · 1 comment ·
Maintainers usually reply within 3 days
-
Fix `otel.sdk.log.created` counting semanticsPossibly taken @anuraaga claimed this 112 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
open-telemetry/opentelemetry-java#8688 ·
Maintainers usually reply within 3 days
-
SdkSpanBuilder drops invalid parent TraceState when IdGenerator.generatesRandomTraceIds() is truePossibly taken @Eliot5566 claimed this today. OpenBug SDK
Difficulty 4/5 3-5 days Newbie friendliness 48/100
open-telemetry/opentelemetry-java#9062 · 1 comment ·
Maintainers usually reply within 3 days
All issues in open-telemetry/opentelemetry-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
micronaut-projects/micronaut-core#14585 ·
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
opensearch-project/cross-cluster-replication#1805 ·
Maintainers usually reply within 1 day
-
feature request needs triage
Difficulty 1/5 Under an hour Newbie friendliness 66/100
TeamNewPipe/NewPipe#14083 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PCL-Community/PCL-CE#3907 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 2 days