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

OpenTelemetry: error! fails with nil body #11

Closed
leahneukirchen opened this issue Jun 24, 2024 · 3 comments
Closed

OpenTelemetry: error! fails with nil body #11

leahneukirchen opened this issue Jun 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@leahneukirchen
Copy link

Trying to log an exception using (error! ex) fails in setBody

value must not be null
  java.util.Objects/requireNonNull at Objects.java:259
  io.opentelemetry.api.incubator.logs.AnyValueString/create at AnyValueString.java:19
  io.opentelemetry.api.incubator.logs.AnyValue/of at AnyValue.java:37
  io.opentelemetry.sdk.logs.SdkLogRecordBuilder/setBody at SdkLogRecordBuilder.java:91
  io.opentelemetry.sdk.logs.SdkLogRecordBuilder/setBody at SdkLogRecordBuilder.java:24
  taoensso.telemere.open_telemetry$handler_COLON_open_telemetry_logger$a_handler_COLON_open_telemetry_logger__14233/invoke at NO_SOURCE_FILE:228
  taoensso.encore.signals$wrap_handler$handle_signal_BANG___12229$fn__12230/invoke at signals.cljc:730
  taoensso.encore.signals$wrap_handler$handle_signal_BANG___12229/invoke at signals.cljc:699

This can be avoided when .setBody is not called. But perhaps a default body should be constructed from exception.type and exception.message, as e.g. Loki will just display an empty line else.

@ptaoussanis ptaoussanis added the bug Something isn't working label Jun 24, 2024
@ptaoussanis ptaoussanis self-assigned this Jun 24, 2024
@ptaoussanis ptaoussanis added this to the Next beta milestone Jun 24, 2024
@ptaoussanis
Copy link
Member

Thanks for the report! Will be fixed in the next beta 👍

@ptaoussanis
Copy link
Member

Fixed on upcoming master

@ptaoussanis
Copy link
Member

This should be fixed with beta15, now on Clojars. But please ping if you're still having any issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants