DatadogInstrumentation simplifies Kubernetes observability by decoupling instrumentation configuration from agent deployments. It introduces a custom resource definition (CRD) to manage checks, logs, tracing, and profiling for workloads, promoting GitOps practices and consistent monitoring across clusters. This approach improves operational efficiency and ensures that observability configurations scale with microservice architectures.
Read original on Datadog BlogIn a microservices architecture orchestrated by Kubernetes, managing observability configurations can become complex. Traditional methods often tie agent deployments directly to application deployments or require manual configuration changes, leading to inconsistencies and operational overhead. DatadogInstrumentation addresses this by introducing a Custom Resource Definition (CRD) that allows for declarative management of observability settings independent of the application workload definitions or Datadog Agent deployments.
CRDs extend the Kubernetes API, enabling users to define custom objects. DatadogInstrumentation leverages a CRD to define an `Instrumentation` object, which specifies how an application should be instrumented (e.g., what services to trace, where to send logs, specific check configurations). This allows platform teams to standardize observability configurations that developers can then easily apply to their workloads without deep knowledge of Datadog's internal workings.
GitOps and Observability
By defining observability configurations as Kubernetes resources, organizations can embrace GitOps principles. This means that desired observability states are stored in version control, and automated processes reconcile these states with the cluster, ensuring consistency, auditability, and ease of rollback.
apiVersion: datadoghq.com/v1alpha1
kind: DatadogInstrumentation
metadata:
name: my-app-instrumentation
spec:
checks:
- name: my-custom-check
interval: 10s
tracing:
enabled: true
serviceName: my-app-service
logs:
enabled: true
source: my-app
profiling:
enabled: true