Description
This request/feature idea is based on the original PR #14 by @timkelty
It would be nice if extra content values can be added into the SentryTarget logger class. My thoughts around this would be either via an event that a plugin/module could implement or config option in the settings model.
https://github.com/diginov/craft-sentry-logger/blob/main/src/log/SentryTarget.php#L255-L333
Perhaps the original PR was slightly too opinionated to include Craft Cloud specific environment vars directly in the source code that wouldn't apply outside of Craft Cloud, but being able to have a default array and then merge these with custom values to be added via an event, additional config option would be ideal I feel, that doesn't require directly committing into the SentryTarget class would be more flexible.
For example, currently the $extras array is set in the class, there could be an event or additional logic that merges this with a $customExtras array provided by an config option or event which by a plugin/module calls the plugin event to do it.
For Craft Cloud the Yii Extension may be able to use this to insert the Craft Cloud environment vars for any Craft Cloud project if the Sentry Logger is present automatically, as an alternative, but that's just an idea.
Description
This request/feature idea is based on the original PR #14 by @timkelty
It would be nice if extra content values can be added into the SentryTarget logger class. My thoughts around this would be either via an event that a plugin/module could implement or config option in the settings model.
https://github.com/diginov/craft-sentry-logger/blob/main/src/log/SentryTarget.php#L255-L333
Perhaps the original PR was slightly too opinionated to include Craft Cloud specific environment vars directly in the source code that wouldn't apply outside of Craft Cloud, but being able to have a default array and then merge these with custom values to be added via an event, additional config option would be ideal I feel, that doesn't require directly committing into the SentryTarget class would be more flexible.
For example, currently the $extras array is set in the class, there could be an event or additional logic that merges this with a $customExtras array provided by an config option or event which by a plugin/module calls the plugin event to do it.
For Craft Cloud the Yii Extension may be able to use this to insert the Craft Cloud environment vars for any Craft Cloud project if the Sentry Logger is present automatically, as an alternative, but that's just an idea.