- How do I install spatie/our-ray for Laravel?
- Run `composer require spatie/our-ray` in your project directory. The package integrates with Laravel’s service container automatically, so no additional configuration is needed beyond adding your API key to `.env`. Ensure you already have a Ray-compatible package like `spatie/laravel-ray` installed.
- Does spatie/our-ray work with Laravel 10+?
- Yes, the package requires PHP 8.1+ and is compatible with Laravel 10 and 11. Check the [GitHub repository](https://github.com/spatie/our-ray) for the latest version, as Spatie regularly updates dependencies. Laravel’s service container integration ensures smooth compatibility.
- Can I use our() instead of ray() for all debug logs?
- Yes, the `our()` helper replaces `ray()` calls and forwards payloads to ourray.app. It supports all standard Ray payloads, including strings, dumps, and debug data. Replace `ray('message')` with `our()->ray('message')` in your codebase. No changes to existing Ray logic are required.
- What happens if ourray.app is down or unreachable?
- The package does not include built-in retry logic or fallback mechanisms. Payloads may be dropped if the service is unavailable. For critical debugging, consider implementing a local cache (e.g., database or filesystem) to store payloads temporarily until the service is restored.
- Is there a limit to payload size or volume for ourray.app?
- ourray.app may impose payload size limits (e.g., 1MB), which could affect large debug dumps. Compress payloads or split them into smaller chunks if needed. Monitor your usage, as high-volume payloads might incur costs or trigger rate limits. Check ourray.app’s documentation for specifics.
- How do I secure sensitive data in Ray payloads sent to ourray.app?
- Avoid sending personally identifiable information (PII) or sensitive data to third-party services. Sanitize payloads before sending by filtering out confidential details. Use environment variables or configuration to exclude sensitive data from Ray logs entirely. Always review payloads for compliance with GDPR or HIPAA.
- Can I monitor if Ray payloads are successfully delivered to ourray.app?
- The package does not include built-in monitoring for delivery success. You’ll need to implement logging or error handling in your application to track payload delivery. Consider using Laravel’s logging system to record failures or integrating with a monitoring tool like Sentry for alerts.
- What are the alternatives to spatie/our-ray for cloud-based Ray debugging?
- Alternatives include self-hosted solutions like Ray’s local storage with manual exports, or third-party services like Sentry, Logflare, or Datadog for structured logging. If you need Ray-specific cloud storage, consider evaluating ourray.app’s pricing and features against competitors like Laravel Debugbar’s cloud integrations.
- Do I need spatie/laravel-ray to use spatie/our-ray?
- Yes, spatie/our-ray requires a Ray-compatible package like `spatie/laravel-ray` to function. If you haven’t adopted Ray yet, weigh the benefits of adding Ray (e.g., structured debugging) against native Laravel logging or other tools. The package extends existing Ray workflows rather than replacing them.
- How do I test spatie/our-ray before deploying to production?
- Run `composer test` to execute the package’s test suite. Test in a staging environment by sending sample payloads to ourray.app and verifying they appear correctly. Check for performance overhead by simulating high-volume debug logs. Use Laravel’s `--env=testing` flag to isolate tests and avoid polluting production logs.