|
| 1 | +# Logs Beta Configuration Fixes |
| 2 | + |
| 3 | +This document summarizes all the fixes made to ensure that when users select the "Logs Beta" checkbox, the corresponding logs setup code appears in the getting started configuration for all supported SDKs. |
| 4 | + |
| 5 | +## Issue Fixed |
| 6 | + |
| 7 | +The user reported that when selecting the "Logs Beta" checkbox, they didn't see the logs snippet being added to the getting started code. This was because while the checkbox was added to the UI, the actual logs configuration code with proper product option markers was missing from many platform configuration files. |
| 8 | + |
| 9 | +## Solution |
| 10 | + |
| 11 | +Added logs-beta configuration with `___PRODUCT_OPTION_START___ logs-beta` and `___PRODUCT_OPTION_END___ logs-beta` markers to all platform configuration files. |
| 12 | + |
| 13 | +## Files Updated |
| 14 | + |
| 15 | +### 1. Core Configuration Files (platform-includes/getting-started-config/) |
| 16 | + |
| 17 | +#### Python |
| 18 | +- **File**: `platform-includes/getting-started-config/python.mdx` |
| 19 | +- **Added**: `'logs-beta'` to OnboardingOptionButtons |
| 20 | +- **Configuration**: `_experiments={"enable_logs": True}` |
| 21 | + |
| 22 | +#### JavaScript Node.js |
| 23 | +- **File**: `platform-includes/getting-started-config/javascript.node.mdx` |
| 24 | +- **Configuration**: `_experiments: { enableLogs: true }` |
| 25 | +- **Added to**: Both CommonJS and ESM code blocks |
| 26 | + |
| 27 | +#### JavaScript AWS Lambda |
| 28 | +- **File**: `platform-includes/getting-started-config/javascript.aws-lambda.mdx` |
| 29 | +- **Configuration**: `_experiments: { enableLogs: true }` |
| 30 | +- **Added to**: Both async and sync handlers |
| 31 | + |
| 32 | +#### JavaScript GCP Functions |
| 33 | +- **File**: `platform-includes/getting-started-config/javascript.gcp-functions.mdx` |
| 34 | +- **Configuration**: `_experiments: { enableLogs: true }` |
| 35 | +- **Added to**: Http, Background, and CloudEvent functions |
| 36 | + |
| 37 | +#### JavaScript Cloudflare Workers |
| 38 | +- **File**: `platform-includes/getting-started-config/javascript.cloudflare.workers.mdx` |
| 39 | +- **Configuration**: `_experiments: { enableLogs: true }` |
| 40 | + |
| 41 | +#### JavaScript NestJS |
| 42 | +- **File**: `platform-includes/getting-started-config/javascript.nestjs.mdx` |
| 43 | +- **Configuration**: `_experiments: { enableLogs: true }` |
| 44 | + |
| 45 | +#### Ruby Rails |
| 46 | +- **File**: `platform-includes/getting-started-config/ruby.rails.mdx` |
| 47 | +- **Configuration**: `config.enable_logs = true` |
| 48 | + |
| 49 | +#### Ruby Rack |
| 50 | +- **File**: `platform-includes/getting-started-config/ruby.rack.mdx` |
| 51 | +- **Configuration**: `config.enable_logs = true` |
| 52 | +- **Added to**: Both Rackup and non-Rackup configurations |
| 53 | + |
| 54 | +#### Ruby Resque |
| 55 | +- **File**: `platform-includes/getting-started-config/ruby.resque.mdx` |
| 56 | +- **Configuration**: `config.enable_logs = true` |
| 57 | + |
| 58 | +#### Java Spring Boot |
| 59 | +- **File**: `platform-includes/getting-started-config/java.spring-boot.mdx` |
| 60 | +- **Configuration**: |
| 61 | + - Properties: `sentry.logs.enabled=true` |
| 62 | + - YAML: `logs: enabled: true` |
| 63 | + |
| 64 | +#### Go |
| 65 | +- **File**: `platform-includes/getting-started-config/go.mdx` |
| 66 | +- **Configuration**: `EnableLogs: true` |
| 67 | + |
| 68 | +### 2. Platform Documentation Files (docs/platforms/) |
| 69 | + |
| 70 | +#### Go Guides |
| 71 | +- **Files**: |
| 72 | + - `docs/platforms/go/guides/echo/index.mdx` |
| 73 | + - `docs/platforms/go/guides/http/index.mdx` |
| 74 | + - `docs/platforms/go/guides/fiber/index.mdx` |
| 75 | + - `docs/platforms/go/guides/iris/index.mdx` |
| 76 | +- **Added**: `'logs-beta'` to OnboardingOptionButtons |
| 77 | +- **Configuration**: `EnableLogs: true` |
| 78 | + |
| 79 | +### 3. Previously Updated Files (from initial implementation) |
| 80 | + |
| 81 | +#### Main Platform Files |
| 82 | +- `docs/platforms/android/index.mdx` |
| 83 | +- `docs/platforms/dart/guides/flutter/index.mdx` ✓ (already had complete config) |
| 84 | +- `docs/platforms/php/index.mdx` |
| 85 | +- `docs/platforms/python/index.mdx` |
| 86 | +- `docs/platforms/ruby/common/index.mdx` |
| 87 | +- `docs/platforms/go/guides/gin/index.mdx` |
| 88 | +- `docs/platforms/javascript/guides/react/index.mdx` |
| 89 | +- `docs/platforms/javascript/guides/nextjs/manual-setup.mdx` |
| 90 | + |
| 91 | +#### Configuration Files |
| 92 | +- `platform-includes/getting-started-config/javascript.mdx` ✓ |
| 93 | +- `platform-includes/getting-started-config/java.mdx` ✓ |
| 94 | +- `platform-includes/getting-started-config/ruby.mdx` ✓ |
| 95 | + |
| 96 | +## Configuration Patterns by Platform |
| 97 | + |
| 98 | +### JavaScript/Node.js |
| 99 | +```javascript |
| 100 | +_experiments: { enableLogs: true } |
| 101 | +``` |
| 102 | + |
| 103 | +### Python |
| 104 | +```python |
| 105 | +_experiments={"enable_logs": True} |
| 106 | +``` |
| 107 | + |
| 108 | +### Ruby |
| 109 | +```ruby |
| 110 | +config.enable_logs = true |
| 111 | +``` |
| 112 | + |
| 113 | +### Java |
| 114 | +```java |
| 115 | +// Java SDK |
| 116 | +options.getLogs().setEnabled(true) |
| 117 | + |
| 118 | +// Spring Boot Properties |
| 119 | +sentry.logs.enabled=true |
| 120 | + |
| 121 | +// Spring Boot YAML |
| 122 | +logs: |
| 123 | + enabled: true |
| 124 | +``` |
| 125 | + |
| 126 | +### Go |
| 127 | +```go |
| 128 | +EnableLogs: true |
| 129 | +``` |
| 130 | + |
| 131 | +### Android |
| 132 | +```xml |
| 133 | +<meta-data android:name="io.sentry.logs.enabled" android:value="true" /> |
| 134 | +``` |
| 135 | + |
| 136 | +### Flutter/Dart |
| 137 | +```dart |
| 138 | +options.enableLogs = true; |
| 139 | +``` |
| 140 | + |
| 141 | +### PHP |
| 142 | +```php |
| 143 | +'enable_logs' => true |
| 144 | +``` |
| 145 | + |
| 146 | +## Result |
| 147 | + |
| 148 | +Now when users select the "Logs Beta" checkbox in any of the supported SDKs (Java, Android, Flutter, PHP, Python, Ruby, Go, and all JavaScript SDKs), they will see the appropriate logs configuration code appear in their setup instructions with the proper product option markers that integrate with the checkbox functionality. |
0 commit comments