-
Notifications
You must be signed in to change notification settings - Fork 159
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
Comments
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 Does the above represent the behavior you are experiencing? What behavior would you advocate for? Thanks! 😃 |
@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. |
Also seeing this behavior. Is it a laravel problem or a datadog classification problem? 🤔 |
Hi! From my understanding of the issue, I'd describe the behavior as expected. This behavior is not Laravel nor dd-trace-php specific; This is how errors not associated with a status code are represented on this view. On the above view, no errors are shown since the error is handled and doesn't bubble up to the root span. On this view, |
I believe this is related to #3047 Laravel uses specific exceptions to control flow in an application. Namely, it will throw a This exception can be throw early from the dispatcher when not able to find a matching route, or later inside a The exception handler should be seeing this type as "not reportable". As it stands, it works correctly when the exception is thrown for unmatched routes, but does not work in cases where a controller is throwing the same exception type. Edit: more to the point, the exception is being classified as an |
Bug report
Write a controller and produce a 404 like so
Then in the datadog apm those responses are classified as "non-http" errors:
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
The text was updated successfully, but these errors were encountered: