autometrics-dev / autometrics-go

Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries
https://autometrics.dev
Apache License 2.0
143 stars 9 forks source link

Use WithFoo() arguments to autometrics.Init instead of long function signature #83

Closed gagbo closed 12 months ago

gagbo commented 1 year ago

Description

Instead of having a long function signature with various custom types for Init, we use the With... option pattern to make the API easier to remember and use.

On top of that , as long as we provide default values, we can add extra initialization arguments without making breaking changes.

Still todo (on top of the checklist below):

Fixes AM-141

Checklist