posthog-rails logs: /i/v1/logs returns JSON {} to protobuf OTLP requests, causing ExportLogsServiceResponse decode ERROR on every export
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
The report identifies the /i/v1/logs ingestion endpoint and the OTLP logs exporter as the relevant entry points, but does not name repository files or tests. Start by tracing how the endpoint handles application/x-protobuf requests and compare its response with the OTLP/HTTP expectation described here. Done means protobuf requests receive a valid protobuf response (or an empty body) with the appropriate content type, without triggering the exporter decode error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
With config.logs_enabled = true, posthog-rails sets up OpenTelemetry::Exporter::OTLP::Logs::LogsExporter pointed at https://us.i.posthog.com/i/v1/logs. The exporter sends Content-Type: application/x-protobuf, but the endpoint replies 200 with content-type: application/json and a body of {}. The exporter then tries to decode that body as a protobuf ExportLogsServiceResponse and fails, which logs an ERROR on every batch export.
Environment
- Ruby 3.3
- posthog-ruby 3.23.x
- posthog-rails 3.18.6
- opentelemetry-exporter-otlp-logs 0.6.0 (latest)
- opentelemetry-logs-sdk 0.8.0
Repro
curl -s -D - -X POST https://us.i.posthog.com/i/v1/logs \
-H 'Content-Type: application/x-protobuf' \
-H 'Authorization: Bearer phc_test' \
--data-binary @/dev/null
Response:
HTTP/2 200
content-type: application/json
content-length: 2
{}
On a 2xx response the exporter calls log_partial_success(response.body), which runs ExportLogsServiceResponse.decode("{}") and raises Google::Protobuf::ParseError. Every export then logs:
ERROR -- : OpenTelemetry error: unexpected error decoding ExportLogsServiceResponse in OTLP::Exporter#log_partial_success - Error occurred during parsing - .../opentelemetry-exporter-otlp-logs-0.6.0/lib/opentelemetry/exporter/otlp/logs/logs_exporter.rb:246:in 'decode'
Expected vs actual
- Expected: Per the OTLP/HTTP spec, the response uses the request's Content-Type, so a protobuf request gets back a protobuf-encoded
ExportLogsServiceResponse. An empty body is a valid empty message. No error is logged. - Actual: The JSON
{}body causes an ERROR-level log line on every batch export from every process. Records are still ingested, because the exporter has already returned SUCCESS. But the noise is constant and hides real export failures.
Suggested fix
- Ingestion endpoint: for
application/x-protobufrequests, return an empty body or a protobuf-encodedExportLogsServiceResponsewithcontent-type: application/x-protobuf. - Until then, posthog-rails could install a scoped
OpenTelemetry.error_handlerfilter for this specific decode error, or document the noise.
- Lenguaje dominante
- Ruby
- Estrellas
- 37
- Forks
- 34
- Merge medio
- 20 h 30 min
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PostHog/posthog-ruby
-
bug enhancement feature/feature-flags
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
PostHog/posthog-ruby#189 ·
Los mantenedores suelen responder en 1 día
-
enhancement feature/feature-flags
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
PostHog/posthog-ruby#188 ·
Los mantenedores suelen responder en 1 día
-
bug enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
PostHog/posthog-ruby#186 ·
Los mantenedores suelen responder en 1 día
-
enhancement team/logs
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
PostHog/posthog-ruby#185 ·
Los mantenedores suelen responder en 1 día
-
SDK referencesAbiertodocumentation
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PostHog/posthog-ruby#148 ·
Los mantenedores suelen responder en 1 día
Todos los issues de PostHog/posthog-ruby
Issues similares
-
agent:triaged bug bughunt pm:bundler priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
SocketDev/socket-patch#1573 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug chat verified
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 6 días
-
🐞 bug pending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CircuitVerse/CircuitVerse#8031 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Empty members in the Accept header cause a 500Posiblemente ocupada @koic la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
modelcontextprotocol/ruby-sdk#609 ·
Los mantenedores suelen responder en 1 día
-
BazaRb::Fake#enter rejects dotted badges accepted by BazaRb#enterPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día