observability-guidelines
Observability guidelines for distributed systems using OpenTelemetry, tracing, metrics, and structured logging
What this skill does
# Observability Guidelines Apply these observability principles to ensure comprehensive visibility into distributed systems and microservices. ## Core Observability Principles - Guide the development of idiomatic, maintainable, and high-performance code with built-in observability - Enforce modular design and separation of concerns through Clean Architecture - Promote test-driven development and robust observability from the start ## OpenTelemetry Integration - Use OpenTelemetry for distributed tracing, metrics, and structured logging - Start and propagate tracing spans across all service boundaries - Use otel.Tracer for creating spans and otel.Meter for collecting metrics - Export data to OpenTelemetry Collector, Jaeger, or Prometheus - Configure appropriate sampling rates for production environments ## Distributed Tracing - Trace all incoming requests and propagate context through internal calls - Use middleware to instrument HTTP and gRPC endpoints automatically - Include trace context in all downstream service calls - Create child spans for significant operations within a service - Add relevant attributes to spans for debugging and analysis ## Metrics Collection Monitor these key metrics across all services: - **Request latency**: Track p50, p90, p95, and p99 percentiles - **Throughput**: Measure requests per second by endpoint - **Error rate**: Track 4xx and 5xx responses separately - **Resource usage**: Monitor CPU, memory, disk, and network utilization - **Custom business metrics**: Track domain-specific KPIs ## Structured Logging - Include unique request IDs and trace context in all logs for correlation - Use structured logging formats (JSON) for machine parseability - Include relevant context: timestamp, service name, trace ID, span ID - Log at appropriate levels: DEBUG, INFO, WARN, ERROR - Avoid logging sensitive information (PII, credentials) ## Architecture Patterns - Apply Clean Architecture with handlers, services, repositories, and domain models - Use domain-driven design principles for clear boundaries - Prioritize interface-driven development with explicit dependency injection - Prefer composition over inheritance; favor small, purpose-specific interfaces ## Correlation and Context - Propagate context through the entire request lifecycle - Use correlation IDs for request tracking across services - Include service version and deployment information in telemetry - Tag traces with relevant business context for filtering - Enable trace-to-log and log-to-trace correlation ## Alerting and Dashboards - Create dashboards for service health and business metrics - Set up alerts based on SLOs and error budgets - Use anomaly detection for proactive issue identification - Document runbooks for common alert scenarios - Review and tune alerts regularly to reduce noise ## Instrumentation Best Practices - Instrument at service boundaries (entry/exit points) - Add custom spans for database operations and external calls - Include relevant attributes (user ID, request type, etc.) - Avoid over-instrumentation that creates noise - Use semantic conventions for consistent attribute naming ## Production Considerations - Configure appropriate sampling rates to balance visibility and cost - Use head-based sampling for consistent trace capture - Implement tail-based sampling for capturing errors - Set retention policies based on debugging needs - Monitor observability infrastructure health
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.