ExportXMLWordPrintable

    • Type: Incident report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 8.0.0
    • Component/s: Proxy (P)

      If any log record in an OTLP batch contains invalid UTF-8, the proxy rejects the whole batch, valid records included, and the error comes from the library. When the same data is written directly to ClickHouse, without the proxy (for example, by the OpenTelemetry Collector), it is accepted and stored, and then the frontend fails to display logs. This problem needs additional investigation.

      Proxy side:

      Step to reproduce:

      1. Start a Collector that forwards to the proxy (example, any OTLP sender will do):
        docker run --rm --network host otel/opentelemetry-collector-contrib:0.164.0 --config='yaml:{receivers: {otlp: {protocols: {http: {endpoint: "localhost:4318"}}}}, exporters: {otlp: {endpoint: "127.0.0.1:4317", tls: {insecure: true}}}, service: {telemetry: {metrics: {level: none}}, pipelines: {logs: {receivers: [otlp], exporters: [otlp]}}}}'
        
      2. Send one batch with a valid log record and a record with invalid UTF-8:
        curl http://localhost:4318/v1/logs -H 'Content-Type: application/json' -d "$(printf '{"resourceLogs":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"utf-demo"}}]},"scopeLogs":[{"logRecords":[{"body":{"stringValue":"good line"}},{"body":{"stringValue":"bad \xff\xfe line"}}]}]}]}')"
        
      3. Check the database:
        SELECT Timestamp, Body FROM otel_logs WHERE ServiceName = 'utf-demo';
        

      Actual result: The proxy log shows an error from the protobuf library and none of the records are stored in the database.

      [libprotobuf ERROR google/protobuf/wire_format_lite.cc:618] String field 'opentelemetry.proto.common.v1.AnyValue.string_value' contains invalid UTF-8 data when parsing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.
      

      Expected result: Either a clear error in the proxy log or the data is accepted and stored.

      Frontend side:

      Steps to reproduce:

      1. Write log records directly to the database, one of them with invalid UTF-8 (can be sent via OTEL Collector as well, but it takes more time):
        INSERT INTO otel_logs (Timestamp, ServiceName, Body) VALUES (now64(9), 'utf-ui', 'good line'), (now64(9), 'utf-ui', 'bad \xFF\xFE line');
        
      2. Open APM -> Logs.

      Actual result: APM -> Logs shows an error when reading from the database and no logs are displayed: Unable to decode data received from ClickHouse.

      Expected result: no error, logs are displayed and invalid characters are shown as "?".

            Assignee:
            Zabbix Development Team
            Reporter:
            Rostislavs Belovs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: