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]: aborting a http request with abort(404) produces "non-http" errors in APM #3010

Open
rburgst opened this issue Dec 21, 2024 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@rburgst
Copy link

rburgst commented Dec 21, 2024

Bug report

Write a controller and produce a 404 like so

class TestController extends Controller
{
    /**
     * Display a listing of the resource.
     */
    public function index()
    {
        abort(404, "not found")
    }

Then in the datadog apm those responses are classified as "non-http" errors:
Image

PHP version

8.3.14

Tracer or profiler version

1.5.1

Installed extensions

bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
pspell
random
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

Output of phpinfo()

{ "date": "2024-12-21T06:43:11Z", "os_name": "Linux 3b353a35b6a0 6.5.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 9 22:39:36 UTC 2024 aarch64", "os_version": "6.5.0-15-generic", "version": "1.5.1", "lang": "php", "lang_version": "8.3.13", "env": null, "enabled": true, "service": null, "enabled_cli": true, "agent_url": "http://localhost:8126", "debug": false, "analytics_enabled": false, "sample_rate": -1, "sampling_rules": [], "tags": [], "service_mapping": [], "distributed_tracing_enabled": true, "dd_version": "0.0.0", "architecture": "aarch64", "instrumentation_telemetry_enabled": true, "sapi": "fpm-fcgi", "datadog.trace.sources_path": "/opt/datadog/dd-library/1.5.1/dd-trace-sources/src", "open_basedir_configured": false, "uri_fragment_regex": null, "uri_mapping_incoming": null, "uri_mapping_outgoing": null, "auto_flush_enabled": false, "generate_root_span": true, "http_client_split_by_domain": false, "measure_compile_time": true, "report_hostname_on_root_span": false, "traced_internal_functions": null, "enabled_from_env": true, "opcache.file_cache": null, "sidecar_trace_sender": true, "agent_error": "Failed to connect to localhost port 8126 after 0 ms: Couldn't connect to server" }

Upgrading from

No response

@rburgst rburgst added the 🐛 bug Something isn't working label Dec 21, 2024
@PROFeNoM
Copy link
Contributor

PROFeNoM commented Jan 6, 2025

Hey @rburgst 👋

As far as I've been able to reproduce, the top graph only shows this kind of "Non-HTTP" bar when under the "All Spans" view. The latter view includes the laravel.action span, marked as an error since abort() throws a NotFoundHttpException. This error doesn't have a status code, so it falls under the "Non-HTTP" Errors.
I don't see such bars while querying on "Trace Root Spans" or "Service Entry Spans".

Does the above represent the behavior you are experiencing? What behavior would you advocate for?

Thanks! 😃

@rburgst
Copy link
Author

rburgst commented Jan 7, 2025

@PROFeNoM I am not sure I follow. The NotFoundHttpException produces a 404 http error. So I am a bit confused that those would show up as Non-HTTP Errors. Therefore I would expect the error to show up as a 404.

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