-
Hello All, In this documentation page, it mentions to use My issue is that i cannot get the logs (using logback) exported. <dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-spring-boot-starter</artifactId>
<version>1.32.0-alpha</version>
</dependency>
and enviroment variable OTEL_LOGS_EXPORTER=otlp Could you please let me know if I must explicitly add all dependencies if I wish to use the collector with spring-boot version 3? Thank you for all the great work. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Environment variables like |
Beta Was this translation helpful? Give feedback.
-
@laurit thank you for looking into my issue. I tried your suggestion but the logs are still not reaching the collector. I made the following changes to maven dependencies and logback config - swaroopar/osc@dc0f223 If I shutdown the collector docker container, I only see warnings for traces and metrics. Nothing for logs.
P.S - Please let me know if i'm still missing something. |
Beta Was this translation helpful? Give feedback.
-
@laurit after some debugging I saw that only the <dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp-logs</artifactId>
<version>1.26.0-alpha</version>
</dependency> Exception in thread "BatchLogRecordProcessor_WorkerThread-1" java.lang.NoSuchMethodError: 'long io.opentelemetry.sdk.logs.data.LogRecordData.getEpochNanos()'
at io.opentelemetry.exporter.internal.otlp.logs.LogMarshaler.create(LogMarshaler.java:49)
at io.opentelemetry.exporter.internal.marshal.MarshalerUtil.groupByResourceAndScope(MarshalerUtil.java:67)
at io.opentelemetry.exporter.internal.otlp.logs.ResourceLogsMarshaler.groupByResourceAndScope(ResourceLogsMarshaler.java:98)
at io.opentelemetry.exporter.internal.otlp.logs.ResourceLogsMarshaler.create(ResourceLogsMarshaler.java:38)
at io.opentelemetry.exporter.internal.otlp.logs.LogsRequestMarshaler.create(LogsRequestMarshaler.java:33)
at io.opentelemetry.exporter.otlp.logs.OtlpGrpcLogRecordExporter.export(OtlpGrpcLogRecordExporter.java:55)
at io.opentelemetry.sdk.logs.export.BatchLogRecordProcessor$Worker.exportCurrentBatch(BatchLogRecordProcessor.java:312)
at io.opentelemetry.sdk.logs.export.BatchLogRecordProcessor$Worker.run(BatchLogRecordProcessor.java:229)
at java.base/java.lang.Thread.run(Thread.java:1583) |
Beta Was this translation helpful? Give feedback.
-
Adding this specific dependency is needed for spring-boot in addition to the starter <dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>1.32.0</version>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement> |
Beta Was this translation helpful? Give feedback.
Adding this specific dependency is needed for spring-boot in addition to the starter