[opentelemetry-php-contrib] laravel: queue hooks fail with sem-conv 1.45 (undefined MessagingIncubatingAttributes::MESSAGING_SYSTEM)

Open Beginner friendly
#2,139 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@gowtham-padala is already working on this.

Since Nov 17, 2026.

  • #772 by @gowtham-padala — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
laravel, php, redis

Research direction

The failing reference is in src/Instrumentation/Laravel/src/Hooks/Illuminate/Queue/AttributesBuilder.php, lines 55, 63 and 71, which use MessagingIncubatingAttributes::MESSAGING_SYSTEM. Check the sem-conv 1.45 incubating class for MESSAGING_SYSTEM_NAME and its AWS SQS value constant. Done means the queue pre-hooks no longer throw and the messaging attributes are emitted; confirm it against a Redis push test under the Laravel instrumentation tests.

Written by the indexing model from the issue text.

Description

Describe your environment

  • PHP 8.5.12, ext-opentelemetry 1.4.2
  • Laravel 13.42.0, Horizon (Redis queues)
  • open-telemetry/opentelemetry-auto-laravel 1.10.0, the latest release
  • open-telemetry/sem-conv 1.45.0, open-telemetry/sdk 1.16.1, open-telemetry/exporter-otlp 1.5.0
  • OTEL_PHP_AUTOLOAD_ENABLED=true, OTEL_TRACES_EXPORTER=otlp

Steps to reproduce

  1. Install open-telemetry/opentelemetry-auto-laravel 1.10.0. Its composer.json allows open-telemetry/sem-conv: ^1.38, so a normal composer update resolves sem-conv 1.45.0. sdk 1.16.x also requires sem-conv ^1.45.0.
  2. 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-conv 1.45.0 no longer has MessagingIncubatingAttributes::MESSAGING_SYSTEM; the incubating class now has MESSAGING_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 on main) still uses MessagingIncubatingAttributes::MESSAGING_SYSTEM. The same applies to MESSAGING_SYSTEM_VALUE_AWS_SQS.
  • So opentelemetry-auto-laravel 1.10.0 is incompatible with sem-conv >= 1.45, although its constraint (^1.38) allows it.

Possible fixes:

  • move the builder to the new attribute name, MESSAGING_SYSTEM_NAME, keeping the messaging.system key if the old semantic is still wanted;
  • or cap the constraint at sem-conv <1.45 until 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.

Dominant language
PHP
Stars
923
Forks
234
Avg merge
1d 20h
Merged PRs (30d)
35

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from open-telemetry/opentelemetry-php

All issues in open-telemetry/opentelemetry-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.