Skip to content

Commit 98e49cc

Browse files
ostermanClaude (via Conductor)claudeaknysh
authored
fix: Use YAML !env function in Sentry config examples (#1793)
* fix: Use YAML !env function instead of shell-style variable expansion in Sentry config examples Replace shell-style variable expansion (${VAR}) with proper YAML function syntax (!env VAR) in all Sentry configuration examples. Changes: - Updated website/docs/cli/configuration/errors.mdx - Updated website/blog/2025-11-08-helpful-errors.mdx Examples now correctly show: dsn: !env ATMOS_SENTRY_DSN environment: !env ATMOS_ENV Instead of: dsn: "${ATMOS_SENTRY_DSN}" environment: "${ATMOS_ENV}" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * docs: Remove redundant "Why This Matters" and "What's Next" sections from blog post Removed two sections that were redundant or not needed: - "Why This Matters" section - "What's Next" section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * docs: Remove "Real-World Impact" section from blog post Removed the entire "Real-World Impact" section including: - "Faster Troubleshooting" subsection with time-to-resolution claims - "Enterprise Visibility" subsection - "Better Developer Experience" subsection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude (via Conductor) <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Andriy Knysh <[email protected]>
1 parent f4c2d94 commit 98e49cc

File tree

2 files changed

+17
-94
lines changed

2 files changed

+17
-94
lines changed

website/blog/2025-11-08-helpful-errors.mdx

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -155,63 +155,6 @@ Benefits:
155155
- **Type-safe** - Static error definitions prevent typos
156156
- **Testable** - Mock and verify error messages in tests
157157

158-
## Real-World Impact
159-
160-
### Faster Troubleshooting
161-
162-
**Before:**
163-
```
164-
Error: command execution failed
165-
Exit code: 1
166-
```
167-
Time to resolution: 30+ minutes (searching docs, trial and error)
168-
169-
**After:**
170-
```
171-
# Workflow Error
172-
173-
**Error:** workflow step execution failed
174-
175-
## Explanation
176-
177-
The following command failed to execute:
178-
atmos terraform plan vpc -s prod
179-
180-
## Hints
181-
182-
💡 To resume the workflow from this step, run:
183-
atmos workflow deploy -f prod --from-step deploy-vpc
184-
185-
💡 Check component configuration in stacks/prod.yaml
186-
187-
## Context
188-
189-
Workflow: deploy
190-
Step: deploy-vpc
191-
Component: vpc
192-
Stack: prod-us-east-1
193-
Exit Code: 1
194-
```
195-
Time to resolution: 2-3 minutes (clear guidance + exact command to retry)
196-
197-
### Enterprise Visibility
198-
199-
Platform teams can now:
200-
201-
1. **Track error patterns** - "70% of errors are missing AWS credentials"
202-
2. **Identify problem areas** - "Component X fails validation in 3 different stacks"
203-
3. **Measure improvement** - "Error rate decreased 40% after documentation update"
204-
4. **Support teams proactively** - "Team Y has 10x more errors than average"
205-
206-
### Better Developer Experience
207-
208-
Contributors can:
209-
210-
1. **Add helpful errors easily** - Use error builder pattern
211-
2. **Test error messages** - Verify hints and formatting
212-
3. **Maintain consistency** - All errors follow the same pattern
213-
4. **Iterate quickly** - Update hints without changing error handling
214-
215158
## Configuration
216159

217160
### Basic Setup (Better Error Messages)
@@ -231,8 +174,8 @@ errors:
231174
# Sentry integration
232175
sentry:
233176
enabled: true
234-
dsn: "${ATMOS_SENTRY_DSN}"
235-
environment: "${ATMOS_ENV}"
177+
dsn: !env ATMOS_SENTRY_DSN
178+
environment: !env ATMOS_ENV
236179

237180
# Sample rate: 1.0 = 100%, 0.5 = 50% (default: 1.0)
238181
sample_rate: 1.0
@@ -282,26 +225,6 @@ return errUtils.Build(errUtils.ErrWorkflowNotFound).
282225

283226
See `docs/errors.md` for the complete developer guide.
284227

285-
## Why This Matters
286-
287-
Infrastructure as Code is complex. When managing hundreds of components across multiple environments, every minute spent debugging is time not spent delivering value.
288-
289-
By providing **helpful hints**, **rich context**, and **enterprise error tracking**, we're:
290-
291-
1. **Reducing time to resolution** - Fix issues in minutes instead of hours
292-
2. **Improving team productivity** - Less context switching, more building
293-
3. **Enabling data-driven improvements** - Track and fix systemic issues
294-
4. **Creating better software** - Consistent, helpful error messages across Atmos
295-
296-
This is infrastructure we wish we'd had years ago. Now it's built into Atmos by default.
297-
298-
## What's Next
299-
300-
We're continuing to improve error handling:
301-
302-
- **More helpful hints** - Adding guidance to more errors across Atmos
303-
- **Enhanced context** - Automatically include more relevant information with each error
304-
305228
## Get Involved
306229

307230
We'd love your feedback:

website/docs/cli/configuration/errors.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ errors:
200200
201201
# Use environment variable for dynamic environment name
202202
# Set ATMOS_ENVIRONMENT in your CI/CD pipeline
203-
environment: "${ATMOS_ENVIRONMENT}"
203+
environment: !env ATMOS_ENVIRONMENT
204204
205205
# Set release from CI/CD pipeline
206206
# Example: "v1.2.3" or "commit-abc123"
207-
release: "${CI_COMMIT_TAG}"
207+
release: !env CI_COMMIT_TAG
208208
209209
# Reduce noise in development
210210
sample_rate: 0.1 # Only 10% of errors in dev
@@ -256,7 +256,7 @@ export ATMOS_SENTRY_DSN="https://[email protected]/project-id"
256256
errors:
257257
sentry:
258258
enabled: true
259-
dsn: "${ATMOS_SENTRY_DSN}"
259+
dsn: !env ATMOS_SENTRY_DSN
260260
environment: "production"
261261
```
262262
</File>
@@ -272,11 +272,11 @@ Track infrastructure deployment failures across all your CI pipelines:
272272
errors:
273273
sentry:
274274
enabled: true
275-
dsn: "${SENTRY_DSN}"
275+
dsn: !env SENTRY_DSN
276276
environment: "ci"
277277
tags:
278-
pipeline: "${CI_PIPELINE_ID}"
279-
branch: "${CI_COMMIT_BRANCH}"
278+
pipeline: !env CI_PIPELINE_ID
279+
branch: !env CI_COMMIT_BRANCH
280280
team: "platform"
281281
```
282282
</File>
@@ -296,12 +296,12 @@ Different teams can share the same Sentry project with custom tags:
296296
errors:
297297
sentry:
298298
enabled: true
299-
dsn: "${SENTRY_DSN}"
300-
environment: "${ENVIRONMENT}"
299+
dsn: !env SENTRY_DSN
300+
environment: !env ENVIRONMENT
301301
tags:
302-
team: "${TEAM_NAME}" # "platform", "security", "data"
302+
team: !env TEAM_NAME # "platform", "security", "data"
303303
service: "atmos"
304-
region: "${AWS_REGION}"
304+
region: !env AWS_REGION
305305
```
306306
</File>
307307

@@ -321,16 +321,16 @@ Reduce noise in development while maintaining full monitoring in production:
321321
errors:
322322
format:
323323
# More detail in development
324-
verbose: ${DEVELOPMENT:-false}
324+
verbose: !env DEVELOPMENT false
325325
326326
sentry:
327327
# Only enable in production/staging
328-
enabled: ${SENTRY_ENABLED:-false}
329-
dsn: "${SENTRY_DSN}"
330-
environment: "${ENVIRONMENT:-development}"
328+
enabled: !env SENTRY_ENABLED false
329+
dsn: !env SENTRY_DSN
330+
environment: !env ENVIRONMENT development
331331
332332
# Sample aggressively in dev, fully in prod
333-
sample_rate: ${SENTRY_SAMPLE_RATE:-0.1}
333+
sample_rate: !env SENTRY_SAMPLE_RATE 0.1
334334
```
335335
</File>
336336

0 commit comments

Comments
 (0)