Skip to content

Conversation

MilesChou
Copy link
Contributor

I have been using the package vladimir-yuldashev/laravel-queue-rabbitmq in my work. However, I noticed that the auto Laravel feature only handles Laravel's native queues, without any interface for developers to add custom queue parsing.

This PR introduces an interface that allows the registration of custom queues. By creating a class that extends AbstractContextualAttributesBuilder and registering it with AttributesBuilderRegister , it will automatically be recognized and processed during the hook phase.

@MilesChou MilesChou requested a review from a team September 5, 2024 08:02
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.80%. Comparing base (9b97522) to head (2f26b8c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #292   +/-   ##
=========================================
  Coverage     84.80%   84.80%           
  Complexity      947      947           
=========================================
  Files            80       80           
  Lines          3798     3798           
=========================================
  Hits           3221     3221           
  Misses          577      577           
Flag Coverage Δ
Aws 85.75% <ø> (ø)
Context/Swoole 0.00% <ø> (ø)
Instrumentation/CodeIgniter 73.94% <ø> (ø)
Instrumentation/ExtAmqp 89.58% <ø> (ø)
Instrumentation/Guzzle 69.73% <ø> (ø)
Instrumentation/HttpAsyncClient 81.33% <ø> (ø)
Instrumentation/IO 70.90% <ø> (ø)
Instrumentation/MongoDB 77.33% <ø> (ø)
Instrumentation/OpenAIPHP 86.82% <ø> (ø)
Instrumentation/PDO 89.56% <ø> (ø)
Instrumentation/Psr14 78.12% <ø> (ø)
Instrumentation/Psr15 93.50% <ø> (ø)
Instrumentation/Psr16 97.50% <ø> (ø)
Instrumentation/Psr18 82.08% <ø> (ø)
Instrumentation/Psr3 61.03% <ø> (ø)
Instrumentation/Psr6 97.61% <ø> (ø)
Instrumentation/Slim 86.95% <ø> (ø)
Instrumentation/Symfony 89.03% <ø> (ø)
Instrumentation/Yii 77.77% <ø> (ø)
Logs/Monolog 100.00% <ø> (ø)
Propagation/ServerTiming 100.00% <ø> (ø)
Propagation/TraceResponse 100.00% <ø> (ø)
ResourceDetectors/Container 93.02% <ø> (ø)
Shims/OpenTracing 92.99% <ø> (ø)
Symfony 88.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b97522...2f26b8c. Read the comment docs.

@MilesChou MilesChou force-pushed the add-queue-register branch 2 times, most recently from dcbf8d8 to c56cf0d Compare September 5, 2024 15:06
@ChrisLightfootWild
Copy link
Contributor

I have been using the package vladimir-yuldashev/laravel-queue-rabbitmq in my work. However, I noticed that the auto Laravel feature only handles Laravel's native queues, without any interface for developers to add custom queue parsing.

My initial thinking around this is that it would be less automatic at that point, if developers have to do additional wiring in their own service providers.

This PR introduces an interface that allows the registration of custom queues. By creating a class that extends AbstractContextualAttributesBuilder and registering it with AttributesBuilderRegister , it will automatically be recognized and processed during the hook phase.

I'm not totally against this but would potentially like to see this as a feature that waits until we could target a 1.1 release with support for this to be provided by the newer SPI mechanism. See open-telemetry/opentelemetry-php#1304 and #269

@MilesChou
Copy link
Contributor Author

I'm not totally against this but would potentially like to see this as a feature that waits until we could target a 1.1 release with support for this to be provided by the newer SPI mechanism. See open-telemetry/opentelemetry-php#1304 and #269

I understand, and I’ll go ahead and close this PR. If there's any testing or help needed when targeting the 1.1 release or implementing this feature with the newer SPI mechanism, I’d be happy to assist.

@MilesChou MilesChou closed this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants