Treblle / treblle-laravel

The official Treblle SDK for Laravel. Seamlessly integrate Treblle to manage communication with your dashboard, send errors, and secure sensitive data.
https://www.treblle.com/
MIT License
129 stars 24 forks source link

Is ignored_environments config working? #60

Closed ejunker closed 1 year ago

ejunker commented 1 year ago

Version

Description

I do not think the ignored_environments config value is used anywhere. I searched through the code for ignored_environments and I only see it referenced in:

Steps to reproduce

  1. In your .env file set TREBLLE_IGNORED_ENV to your current environment
  2. Do not set TREBLLE_API_KEY
  3. Make some API requests and then check your logs and you will see the errors that an API key is not specified

Expected behavior

I would expect to see it referenced in the ServiceProvider or in the middleware but it is not. I would expect that if the environment is ignored that it would use an early return in the middleware. I would also expect that if the environment is ignored that I would not need to set the API key and I would not get the error that I need to set the API key.

Notes

I am still generally confused about how I am expected to use Treblle with multiple environments. Should I have one Treblle project for each environment? How can I have Treblle enabled only in certain environments like staging and production?

JustSteveKing commented 1 year ago

This should be fixed in the latest release

ejunker commented 1 year ago

Thanks @JustSteveKing and I enjoy reading your posts on Laravel News.

JustSteveKing commented 1 year ago

Thank you @ejunker and thank you for the PR!