Skip to content

Examples

Practical examples showing how to use OpenTelemetry observability skills with your AI assistant.

Quick Examples

  • Quick Start


    Get started immediately with common observability tasks

    5-minute examples for immediate productivity

  • Production Patterns


    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:

"Adapt this OpenTelemetry configuration for my Python Django application"

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:

"Convert this Node.js instrumentation pattern to Python Django"

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

Review this instrumentation code for security issues and suggest improvements:
[paste your code]

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

Which skills are being demonstrated

Contributing Examples

Help improve these examples:

  1. Share successful prompts that worked well
  2. Contribute framework-specific examples
  3. Add edge case solutions
  4. Document common issues and solutions

Next Steps

  1. 📖 Start with Quick Start for immediate examples
  2. 🏭 Explore Production Patterns for advanced use cases
  3. 🎯 Try the prompts with your configured AI assistant
  4. 🤝 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.