Error and unable to export logs due to invalid UTF-8
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'
Thanks for calling this out! I have some ideas of what we could try and can take a deeper look this week.
@kaylareopelle Logs may receive attributes or log statements that are encoded as String ASCII-8BIT i.e. binary encoded.
I have seen this in Rack values and some Kafka or RabbitMQ message keys.
https://github.com/open-telemetry/opentelemetry-ruby/issues/1649
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.