Session

Private Data Providers for Clean Data Parsing

HCL is simple and easy to use. But, once you have to read and parse complex data files, it can lead to some pretty complicated and hard to manage code; a maze of `yamldecode`, `flatten`, `try`, and `lookup` calls that nobody wants to review in a PR. The logic is buried, untestable, and fragile.

Private providers offer a better path. Moving YAML parsing into a Go provider, you get to use real programming paradigms: typed structs, error handling, and unit tests. The HCL stays simple and readable. Your parsing logic lives in a place where `go test` actually works.

The primary motivation was to minimize the amount of change during a vendor migration. The data formats vendors inherently use can be wildly different. This talk lays out how and why we decided to move the complexity to Go and leave the HCL as simple as possible. The pros and cons of the approach will be discussed so that one can get into custom providers knowing what problems they solve and what problems they introduce.

Craig Sebenik

Observability Engr

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top