Enhancing Observability in Microservices with OpenTelemetry
This cursorrule details how to implement OpenTelemetry to achieve comprehensive observability in microservices architectures, facilitating better monitoring and troubleshooting.
0 likes
9 views
Rule Content
{ "title": "Enhancing Observability in Microservices with OpenTelemetry", "description": "This rule provides guidelines for implementing OpenTelemetry to achieve comprehensive observability in microservices architectures, facilitating better monitoring and troubleshooting.", "category": "DevOps", "rules": [ { "id": "opentelemetry-instrumentation", "description": "Ensure all microservices are instrumented using OpenTelemetry to collect traces, metrics, and logs for comprehensive observability.", "severity": "error", "patterns": [ { "pattern": "import opentelemetry.*", "message": "OpenTelemetry instrumentation is required for comprehensive observability." } ] }, { "id": "context-propagation", "description": "Implement context propagation across service boundaries to maintain traceability of requests throughout the microservices architecture.", "severity": "warning", "patterns": [ { "pattern": "opentelemetry.context.propagate.*", "message": "Ensure context propagation is implemented to maintain traceability across services." } ] }, { "id": "semantic-conventions", "description": "Adhere to OpenTelemetry semantic conventions for naming and structuring telemetry data to ensure consistency and interoperability.", "severity": "warning", "patterns": [ { "pattern": "opentelemetry.semconv.*", "message": "Use OpenTelemetry semantic conventions for consistent telemetry data." } ] }, { "id": "exporter-configuration", "description": "Configure OpenTelemetry exporters to send telemetry data to appropriate backends for analysis and visualization.", "severity": "error", "patterns": [ { "pattern": "opentelemetry.exporter.*", "message": "Configure OpenTelemetry exporters to send telemetry data to the appropriate backend." } ] }, { "id": "automatic-instrumentation", "description": "Utilize OpenTelemetry's automatic instrumentation capabilities to reduce manual coding efforts and ensure comprehensive data collection.", "severity": "info", "patterns": [ { "pattern": "opentelemetry.auto_instrumentation.*", "message": "Consider using OpenTelemetry's automatic instrumentation to simplify data collection." } ] }, { "id": "data-security", "description": "Implement measures to secure telemetry data, including encryption and access controls, to protect sensitive information.", "severity": "error", "patterns": [ { "pattern": "opentelemetry.security.*", "message": "Ensure telemetry data is secured to protect sensitive information." } ] }, { "id": "performance-monitoring", "description": "Monitor the performance impact of OpenTelemetry instrumentation and adjust configurations to optimize resource utilization.", "severity": "warning", "patterns": [ { "pattern": "opentelemetry.performance.*", "message": "Monitor and optimize the performance impact of OpenTelemetry instrumentation." } ] } ] }