# [[Observability as code]] ![[Observability as code.svg]] [[Observability]] [[X as code|as code]] is the practice of defining what [[Telemetry]] to collect and where to send it using a [[Declarative]] configuration file rather than manually including it in the codebase. An Observability as Code pipeline could involve: - [[Declarative Configuration for OTel SDKs|SDK declarative config]] or [[Environment variables]] - [[Telemetry collector]] and [[ETL]] pipelines as declarative config - Automated testing (for example using [[k6 (tool)|k6]] [[Kubernetes Operator]]) - Automated deployment (for example using [[Kubernetes]] manifests, [[Helm for Kubernetes|Helm]], and [[Hashicorp Terraform|Terraform]]) - Standardized data sources and dashboards used for observing the system (for example using [[Grafana]]) ## See also - [[GitOps]] is a practice that allows for automated testing and deployment tied to commits and pushes to a [[Git]] repository. It emphasises reproducibility and consistency in deployment. - [[Grafana As Code]] is an ongoing project of [[Grafana Labs]] to declaratively define Grafana dashboards. - [[Infrastructure as code]] is the practice of using declarative configuration to deploy application infrastructure. - [[YAML]] is the file format often used for many declarative manifests. - [[Declarative]] programming, in contrast to [[Imperative]] programming, is a way of describing the desired end state of a component rather than ennumerating specific steps to follow to get it there. - [[Declarative Configuration for OTel SDKs]] is a new approach to configuring [[OpenTelemetry]] implementations %% # Excalidraw Data ## Text Elements ## Drawing ```json { "type": "excalidraw", "version": 2, "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.1.4", "elements": [ { "id": "4y8R7iOA", "type": "text", "x": 118.49495565891266, "y": -333.44393157958984, "width": 3.8599853515625, "height": 24, "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": "transparent", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, "groupIds": [], "frameId": null, "roundness": null, "seed": 967149026, "version": 2, "versionNonce": 939059582, "isDeleted": true, "boundElements": null, "updated": 1713723615080, "link": null, "locked": false, "text": "", "rawText": "", "fontSize": 20, "fontFamily": 4, "textAlign": "left", "verticalAlign": "top", "containerId": null, "originalText": "", "lineHeight": 1.2 } ], "appState": { "theme": "dark", "viewBackgroundColor": "#ffffff", "currentItemStrokeColor": "#1e1e1e", "currentItemBackgroundColor": "transparent", "currentItemFillStyle": "solid", "currentItemStrokeWidth": 2, "currentItemStrokeStyle": "solid", "currentItemRoughness": 1, "currentItemOpacity": 100, "currentItemFontFamily": 4, "currentItemFontSize": 20, "currentItemTextAlign": "left", "currentItemStartArrowhead": null, "currentItemEndArrowhead": "arrow", "scrollX": 583.2388916015625, "scrollY": 573.6323852539062, "zoom": { "value": 1 }, "currentItemRoundness": "round", "gridSize": null, "gridColor": { "Bold": "#C9C9C9FF", "Regular": "#EDEDEDFF" }, "currentStrokeOptions": null, "previousGridSize": null, "frameRendering": { "enabled": true, "clip": true, "name": true, "outline": true } }, "files": {} } ``` %%