Examples¶
Practical examples showing how to use OpenTelemetry observability skills with your AI assistant.
Quick Examples¶
-
Get started immediately with common observability tasks
5-minute examples for immediate productivity
-
Real-world production patterns and complete implementations
Battle-tested configurations and advanced use cases
Example Categories¶
🔧 Basic Setup Examples¶
- SDK initialization for popular frameworks
- Basic collector configuration
- Simple metric and trace setup
- Error handling implementation
🛡️ Security Examples¶
- PII protection patterns
- Sensitive data redaction
- Secure attribute handling
- Compliance implementations
⚡ Performance Examples¶
- High-scale collector configuration
- Sampling strategies
- Cardinality control
- Resource optimization
🎯 Framework-Specific Examples¶
- Express.js instrumentation
- Django observability setup
- Go microservice patterns
- Kubernetes deployment configurations
📊 Dynatrace Integration Examples¶
- DQL query patterns
- Dashboard creation
- SLO configuration
- Workflow automation
How to Use These Examples¶
1. Natural Language Prompts¶
Copy the example prompts and use them with your AI assistant:
"Using the observability-agent-skills, add OpenTelemetry tracing to my Express.js API with proper error handling and PII protection"
2. Code Templates¶
Use the provided code as starting points and ask your assistant to adapt them:
3. Progressive Enhancement¶
Start with basic examples and progressively add complexity:
1. Basic instrumentation
2. Add custom metrics
3. Implement security
4. Optimize performance
5. Add business context
4. Technology Translation¶
Use examples from one technology and translate to another:
Interactive Learning¶
Try These Prompts¶
Test your skill setup with these prompts:
Basic Instrumentation¶
Add OpenTelemetry instrumentation to a REST API endpoint that:
- Creates custom spans for business logic
- Includes safe request attributes
- Handles errors properly
- Follows semantic conventions
Collector Configuration¶
Generate an OpenTelemetry collector configuration that:
- Runs in Kubernetes
- Exports to Dynatrace
- Includes PII redaction
- Optimizes for high throughput
Security Implementation¶
Performance Optimization¶
Optimize this OpenTelemetry setup for a high-traffic production environment with 10k requests/second
Example Structure¶
Each example includes:
🎯 Use Case¶
Clear description of what the example demonstrates
📝 Prompt¶
Exact prompt to use with your AI assistant
💻 Expected Output¶
What you should expect to receive
🔍 Key Features¶
Important aspects highlighted in the example
🛡️ Security Notes¶
Security considerations and best practices
⚡ Performance Tips¶
Performance optimization opportunities
🔗 Related Skills¶
Which skills are being demonstrated
Contributing Examples¶
Help improve these examples:
- Share successful prompts that worked well
- Contribute framework-specific examples
- Add edge case solutions
- Document common issues and solutions
Next Steps¶
- 📖 Start with Quick Start for immediate examples
- 🏭 Explore Production Patterns for advanced use cases
- 🎯 Try the prompts with your configured AI assistant
- 🤝 Share your own examples to help the community
The examples are designed to work with any AI assistant configured with the observability-agent-skills. The key is using clear, specific prompts that leverage the skills' knowledge.