Skip to content

Enrich health.Pinger to propagate OpenTelemetry context & support timeout #585

@xeger

Description

@xeger

I would like to trace my clue health checks.

I would also like to bound the maximum time that any Ping will take so that I can use Checker to enforce a service-level objectives on maximum request duration without creating a thundering herd of overlapping pings that consume resources. (Basically: cancel the client context to release any server resources that are being held by "deep pings" to critical dependencies.)

Instrumenting health seems straightforward; see #586 for a proof of concept. My primary question is whether we should build OTel awareness into the health package, but given our go.mod already depends on it, seems harmless to do so.

Adding a timeout to pingers also seems easy; we could add an Option and trigger a context.WithTimeout when the option is provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions