[opentelemetry-php-contrib] laravel: queue hooks fail with sem-conv 1.45 (undefined MessagingIncubatingAttributes::MESSAGING_SYSTEM)
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend, observability
Línea de trabajo
La referencia que falla está en src/Instrumentation/Laravel/src/Hooks/Illuminate/Queue/AttributesBuilder.php, en las líneas 55, 63 y 71, que usan MessagingIncubatingAttributes::MESSAGING_SYSTEM. Revisa en la clase incubating de sem-conv 1.45 la constante MESSAGING_SYSTEM_NAME y su constante de valor para AWS SQS. Se considera terminado cuando los pre-hooks de colas ya no lanzan excepciones y se emiten los atributos de mensajería; confírmalo con una prueba de push a Redis en las pruebas de la instrumentación de Laravel.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe your environment
- PHP 8.5.12,
ext-opentelemetry1.4.2 - Laravel 13.42.0, Horizon (Redis queues)
open-telemetry/opentelemetry-auto-laravel1.10.0, the latest releaseopen-telemetry/sem-conv1.45.0,open-telemetry/sdk1.16.1,open-telemetry/exporter-otlp1.5.0OTEL_PHP_AUTOLOAD_ENABLED=true,OTEL_TRACES_EXPORTER=otlp
Steps to reproduce
- Install
open-telemetry/opentelemetry-auto-laravel1.10.0. Itscomposer.jsonallowsopen-telemetry/sem-conv: ^1.38, so a normalcomposer updateresolvessem-conv1.45.0.sdk1.16.x also requiressem-conv ^1.45.0. - Dispatch any job to a Redis queue, for example
dispatch(new SomeJob).
What is the expected behavior?
The queue hooks create their spans with the messaging attributes, and the trace context propagates to the job.
What is the actual behavior?
Every push to the queue logs this warning, and no queue span is created:
PHP Warning: Illuminate\Queue\RedisQueue::pushRaw(): OpenTelemetry: pre hook threw exception, class=Illuminate\Queue\RedisQueue function=pushRaw message=Undefined constant OpenTelemetry\SemConv\Incubating\Attributes\MessagingIncubatingAttributes::MESSAGING_SYSTEM in Unknown on line 0
PHP Warning: Laravel\Horizon\RedisQueue::pushRaw(): OpenTelemetry: pre hook threw exception, class=Laravel\Horizon\RedisQueue function=pushRaw message=Undefined constant OpenTelemetry\SemConv\Incubating\Attributes\MessagingIncubatingAttributes::MESSAGING_SYSTEM in Unknown on line 0
The job itself is still pushed and processed. What is lost is the queue telemetry: the enqueue span and, through the same AttributesBuilder, the worker side as well.
Additional context
sem-conv1.45.0 no longer hasMessagingIncubatingAttributes::MESSAGING_SYSTEM; the incubating class now hasMESSAGING_SYSTEM_NAME(messaging.system.name). 1.44.0 still has the old constant.src/Instrumentation/Laravel/src/Hooks/Illuminate/Queue/AttributesBuilder.php(lines 55, 63 and 71 onmain) still usesMessagingIncubatingAttributes::MESSAGING_SYSTEM. The same applies toMESSAGING_SYSTEM_VALUE_AWS_SQS.- So
opentelemetry-auto-laravel1.10.0 is incompatible withsem-conv>= 1.45, although its constraint (^1.38) allows it.
Possible fixes:
- move the builder to the new attribute name,
MESSAGING_SYSTEM_NAME, keeping themessaging.systemkey if the old semantic is still wanted; - or cap the constraint at
sem-conv <1.45until it is updated.
Our workaround is to pin open-telemetry/sem-conv to 1.44.*. That also requires sdk 1.15.* and exporter-otlp 1.4.*, because sdk 1.16 requires sem-conv ^1.45.
- Lenguaje dominante
- PHP
- Estrellas
- 923
- Forks
- 234
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 35
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin 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 open-telemetry/opentelemetry-php
-
Invalid numeric `OTEL_*` values abort initialization instead of falling backPosiblemente ocupada @gowtham-padala la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
open-telemetry/opentelemetry-php#2136 ·
Los mantenedores suelen responder en 1 día
-
Requiring sdk package with Slim framework breaks PSR7 detectionPosiblemente ocupada @cjones-vultr la tomó hace 34 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
open-telemetry/opentelemetry-php#2078 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bite sized help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
open-telemetry/opentelemetry-php#1902 · 1 comentario · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
open-telemetry/opentelemetry-php#2143 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
open-telemetry/opentelemetry-php#2137 ·
Los mantenedores suelen responder en 1 día
Todos los issues de open-telemetry/opentelemetry-php
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Icinga/icinga-notifications-web#653 ·
Los mantenedores suelen responder en 1 día
-
MCP Bundle
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
15.0
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
vimeo/psalm#14139 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día