open-telemetry / open-telemetry/opentelemetry-ruby
Error and unable to export logs due to invalid UTF-8
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
I am seeing this error occasionally despite already aggressively sanitizing output before logging.
I'm using the latest releases of all the gems and haven't been able to intentionally reproduce it.
I assume that one of the log lines has something invalid, is there any way to preserve the rest of them or get any additional information to debug this?
ERROR -- : Result code: 1
OpenTelemetry error: Unable to export 10 log records
OpenTelemetry error: unexpected error in OTLP::Exporter#encode - String is invalid UTF-8 - /path/to/ruby/3.3.0/gems/opentelemetry-exporter-otlp-logs-0.2.0/lib/opentelemetry/exporter/otlp/logs/logs_exporter.rb:329:in `method_missing'
Contributor 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.
Research direction
Start by inspecting opentelemetry-exporter-otlp-logs/lib/opentelemetry/exporter/otlp/logs/logs_exporter.rb around line 329 and the OTLP log encoding path. Try to construct a minimal case containing invalid UTF-8, then determine whether valid records can still be exported or whether the exporter can report which record failed. Done should include a reproducible test or clearer diagnostic behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100