Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Laravel Vapor + Octane enabled = missing root spans #3070

Open
matthewnessworthy opened this issue Feb 5, 2025 · 1 comment
Open
Labels
🐛 bug Something isn't working

Comments

@matthewnessworthy
Copy link

Bug report

The primary issue is when Laravel Vapor with Octane ENABLED no root spans are created and only cache, db, curl, events, etc are included in the traces, and the most important laravel.request root spans are missing.

When running on Laravel Vapor WITHOUT Octane enabled, root spans are created for incoming requests correctly.

My .env is as follows

# agent config
DD_AGENT_HOST=datadog-agent.local
DD_AUTOFINISH_SPANS=true
DD_TAGS=source:vapor

# unified service tagging
DD_SERVICE=laravel
DD_ENV=prod

# traces
DD_APM_ENABLED=true
DD_TRACE_GENERATE_ROOT_SPAN=false
DD_TRACE_AUTO_FLUSH_ENABLED=true
DD_TRACE_HEADER_TAGS=x-app-version
DD_TRACE_HTTP_CLIENT_SPLIT_BY_DOMAIN=true
DD_TRACE_HTTP_POST_DATA_PARAM_ALLOWED=*
DD_TRACE_CLIENT_IP_ENABLED=true

# logs
DD_LOGS_INJECTION=true

# profiling
DD_PROFILING_ENABLED=false

datadog-agent.local is the host where the Datadog agent is setup and running

I have tried various combinations of DD_TRACE_GENERATE_ROOT_SPAN=true/false and DD_TRACE_AUTO_FLUSH_ENABLED=true/false, as well as leaving DD_AUTOFINISH_SPANS=true out

As far as I'm aware, the request does not follow a regular Swoole/Roadrunner path and instead enters here https://github.com/laravel/vapor-core/blob/2.0/stubs/octaneRuntime.php

Any insight would be appreciated

Thanks in advance

PHP version

8.4.3

Tracer or profiler version

1.6.3

Installed extensions

No response

Output of phpinfo()

No response

Upgrading from

No response

@matthewnessworthy matthewnessworthy added the 🐛 bug Something isn't working label Feb 5, 2025
@PROFeNoM
Copy link
Contributor

Hi @matthewnessworthy 👋

Apologies for the delay in the response.

Laravel Vapor is a bit of a blind post for us currently, as no testing was done with it. My current guess would be that we are not loading the Swoole/Roadrunner integrations, which could explain why root spans may be missing.

I'd have to set up a sample reproducer and investigate further. I certainly won't have time next week, but will try to look into it as soon as I can.

In the meanwhile, if you manage to spot anything relevant (such as an error) in the tracer debug logs (DD_TRACE_DEBUG: 1), this would be very useful 👍

Thanks for your understanding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants