-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardized OpenSLO to Markdown Support #146
Comments
One of the many conversations I've had over the past few days was kind of related to this in the sense that we were talking about using some kind of cucumber syntax to spit out the OpenSLO definitions based on the awesome formatting that was in one of the talks on day 2 of Monitorama [citation needed ;) ] The idea being that the following would translate into OpenSLO:
This could then generate an SLI that uses This is just one way, I'm sure there are many others, especially as this doesn't use the existing MD format! |
While the OpenSLO specification is great for defining the implementation of SLOs, a high-level, human-readable explanation of the user journeys, etc. would definitely be useful. What is missing as well is the notion of ensuring that SLOs in production will continue to work as expected as code changes over time. Piggybacking on the Cucumber idea, I think these goals could be accomplished by using Cucumber in concert with OpenSLOs without necessarily modifying OSLO itself. The OSLO spec is a declarative definition of the behavior of SLOs, and the Cucumber spec would be the human-readable executable specification for that behavior (as well as the behavior of the instrumented code driving the SLOs). If the OpenSLO spec is updated without also updating the Cucumber spec, then the affected Cucumber scenarios would fail. If a regression is introduced into the code that causes the OpenSLO calculations, alerts, etc. to stop working as expected, then the affected Cucumber scenarios will fail. Any additions to the OpenSLO spec will require corresponding additions to the Cucumber spec (just like how changing other types of code require changes to Cucumber specs). Imagine a Cucumber spec like so (just shooting from the hip with a quick example):
Then imagine the app uses OpenTelemetry along with OpenSLOs and is architected for testability such that dependency injection determines whether OTel data goes into either:
The Cucumber tests would exercise the code to create various scenarios with the OTel data emitted into this in-memory data store and would then execute the OSLO specs against this open OSLO implementation with the Telemetry Query Language queries being executed, alerts being triggered, etc. The Cucumber specs would ensure that the expected alerts, calculations, etc. are working as expected in each scenario. I can imagine also having tooling to measure code coverage (i.e., how much of the OpenSLO specs are tested), as well perhaps automatic generation of Cucumber rules / scenarios from OpenSLOs. More traditional code coverage tooling could be useful for tying code changes to SLOs, like for an automated deployment quality gate to determine whether the SLOs affected by the code changes being deployed have sufficient error budget to do any deployments. This would be difficult as of now because:
And of course, some downsides of this approach that come to mind would be:
TL;DR - SLOs as code = code that should be tested like any other code. |
For a standard query language and overall guidance in that area, check: https://github.com/cncf/tag-observability/blob/main/working-groups/query-standardization.md |
Problem to solve
OpenSLO definitions are great for programmatic interfaces but aren't great for human reading. As an SLO adopter, I want a way to synchronize information between my SLO Documents and OpenSLO definitions. The former (SLO Documents) often include information that isn't as useful from a programmatic point of view, such as verbose descriptions, architecture diagrams, data workflow diagrams, etc.
This information is still critical to the SLO lifecycle, for communicating with stakeholders and gaining alignment, it's just not useful as a core part of the programmatic specification.
Proposal
This still needs a bit of brainstorming, but I'd love a tool that can look at an OpenSLO definition and generate a basic SLO Document in markdown. Additional fields (like Architecture Diagram images, for example) could be stored in
metadata
with a standard naming convention would help organize and generate the resulting markdown.Too much flexibility here gets really close to a full blown CMS, so we'll want to brainstorm ways to keep things simple while still providing sufficient value to SLO adopters.
Further details
This was discussed a bit in the OpenSLO slack : https://openslo.slack.com/archives/C0202J83M3R/p1656536916703469
Links / references
The text was updated successfully, but these errors were encountered: