AutoConfiguredOpenTelemetrySdk, when configured with ResourceProviders loses logs on startup
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
首先,使用 AutoConfiguredOpenTelemetrySdk、opentelemetry-resources、logback appender 以及提供的 WireOpenTelemetry.java、DemoServerMain.java 和 logback-local.xml 文件,复现启动行为。比较正常的 Resource Provider 发现机制与显式设置 EnvironmentResourceProvider 的情况;完成的标准是,安装前排队的数百条日志行都能被传送,而不只是其中几条。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Java
- 星标
- 2.5k
- 派生
- 1.1k
- 平均合并
- 5 天 11 小时
- 30 天内合并 PR
- 41
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
open-telemetry/opentelemetry-java 的其他 Issue
-
`B3PropagatorExtractorMultipleHeaders` allocates when headers are missing可能已有人在做 @Eliot5566 今天认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 82/100
open-telemetry/opentelemetry-java#9065 ·
维护者通常 3 天内回复
-
[incubator] ComposableProbabilitySampler does not validate ratio range可能已有人在做 @eminfikret 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
open-telemetry/opentelemetry-java#9046 · 2 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
PrometheusComponentProvider promotes all resource attributes when resource_constant_labels is empty ({})可能已有人在做 @rooks-ns 于 19 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
open-telemetry/opentelemetry-java#9014 · 1 条评论 ·
维护者通常 3 天内回复
-
Fix `otel.sdk.log.created` counting semantics可能已有人在做 @anuraaga 于 112 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
open-telemetry/opentelemetry-java#8688 ·
维护者通常 3 天内回复
-
SdkSpanBuilder drops invalid parent TraceState when IdGenerator.generatesRandomTraceIds() is true可能已有人在做 @Eliot5566 今天认领。 未关闭Bug SDK
难度 4/5 3-5 天 新手友好度 48/100
open-telemetry/opentelemetry-java#9062 · 1 条评论 ·
维护者通常 3 天内回复
查看 open-telemetry/opentelemetry-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
micronaut-projects/micronaut-core#14585 ·
维护者通常 1 天内回复
-
Mend: dependency security vulnerability untriaged
难度 1/5 1 小时以内 新手友好度 78/100
opensearch-project/cross-cluster-replication#1805 ·
维护者通常 1 天内回复
-
feature request needs triage
难度 1/5 1 小时以内 新手友好度 66/100
TeamNewPipe/NewPipe#14083 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 68/100
PCL-Community/PCL-CE#3907 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 2 天内回复