google / slo-generator

SLO Generator computes SLIs, SLOs, Error Budgets and Burn Rates from supported backends, then exports an SLO report to supported targets.
Apache License 2.0
489 stars 78 forks source link

feat: add support for OpenSearch backend #348

Closed maximepln closed 1 year ago

maximepln commented 1 year ago

Everything is in the title but I will add a bit of details

The goal of that PR is to implement a new backend provider Opensearch

For instance, I opened an issue about this there: Issue 346, in which I explained why the Elasticsearch wasn't usable with Opensearch

As you will see, some code could have been mutualised between the two backend. But as we don't know the direction that will take the 2 backends in the future, and due to the fact that they could become quite different, I chose to avoid adding too much complexity.

Furthermore, most of the people will work on either Opensearch or Elasticsearch so having a common codebase could become complicated when wanting to add new features.

Everything is documented in the right directories and unit tests & mocks were implemented.

maximepln commented 1 year ago

Hi @lvaylet, @bkamin29

What are your thought on this ?

I had to disable py-lint code duplication to have the CI to pass.

lvaylet commented 1 year ago

Hi @maximepln, thanks a lot for this submission. I will take a look at it shortly. Regarding your choice of going with two different backends (with some duplicate code), I ended up doing the exact same thing to support MQL in Cloud Monitoring on top of the existing MQF backend.

maximepln commented 1 year ago

Thanks for the feedback @lvaylet,

I updated to code to use OpenSearch instead of Opensearch

Don't hesitate if you have any other comments

maximepln commented 1 year ago

Hi @lvaylet,

Sorry for the delay to respond, I was away on holiday.

Hope everything is fine now

bkamin29 commented 1 year ago

hello @lvaylet, any updates ?

lvaylet commented 1 year ago

I will take a look tomorrow afternoon.