atlassian / smith

Smith is a Kubernetes workflow engine / resource manager
Apache License 2.0
285 stars 24 forks source link

Added prometheus metrics around bundle condition transitions #300

Closed ychen-atlassian closed 6 years ago

ychen-atlassian commented 6 years ago

This adds a bunch of metrics into prometheus endpoint about bundle transitions, which would be useful for alerting purposes.

Also proposal for the same PR: How about expanding the error enums?

E.g. for resources we often just spit out the error but it would be useful to categorize if the Spec was wrong or service catalog didn't respond or if the resource couldn't be created.

    spec, err := st.evalSpec(res, actual)
    if err != nil {
        return resourceInfo{
            status: resourceStatusError{
 /// this thing could have something like "ResourceSpecInvalidError"?
                err: err,
            },
        }
ash2k commented 6 years ago

Also proposal for the same PR: How about expanding the error enums?

Forgot to answer. We need to rework how we propagate errors within Smith. We have https://github.com/atlassian/smith/issues/276 for this work, lets do it in another PR.