bugsnag / bugsnag-php

BugSnag error monitoring and crash reporting tool for PHP apps
https://docs.bugsnag.com/platforms/php
MIT License
554 stars 77 forks source link

Support sending arguments with stacktraces #632

Closed GrahamCampbell closed 1 year ago

GrahamCampbell commented 3 years ago

Goal

As a developer, I'd like to see the arguments passed to functions in stack trace frames to enable me to better understand what happened and how to reproduce the issue. Closes #519.

Design

The Configuration class has a mechanism for toggling if code should be sent. We can copy this design to add support for toggling if argument values should be included. Objects, arrays and resources are represented by noting their type but not their value. Quite a rabbit hole otherwise...

Changeset

New setSendArguments and shouldSendArguments functions. Disabled by default, so no change in functionality for existing users.

Testing

Unit tests.

luke-belton commented 3 years ago

hey @GrahamCampbell thanks for submitting this! We're going to take a look and review as soon as priorities allow it 👍

mattdyoung commented 2 years ago

Hi @GrahamCampbell

Thanks for the PR. Unfortunately we've decided that we're not going to move forward with this feature for the time being.

There are a few wider issues that would need to be addressed such as dashboard updates to ensure long values wrap sensibly, and providing a new API with finer control over redacting data as the arguments are highly likely to contain sensitive data in some applications. We'd need to invest some effort in designing and implementing these changes to fully support this in an acceptable way.

We're continuing to monitor interest on the original github issue and may pick this up again in the future when priorities allow.