Documentation ¶
Index ¶
- Variables
- func AugmentWithResponse(baseCtx context.Context, responseCode int) context.Context
- func AugmentWithRevision(baseCtx context.Context, ns, svc, cfg, rev string) (context.Context, error)
- func PodContext(pod, container string) (context.Context, error)
- func PodRevisionContext(pod, container, ns, svc, cfg, rev string) (context.Context, error)
- func RevisionContext(ns, svc, cfg, rev string) (context.Context, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NamespaceTagKey = tag.MustNewKey(metricskey.LabelNamespaceName) ServiceTagKey = tag.MustNewKey(metricskey.LabelServiceName) ConfigTagKey = tag.MustNewKey(metricskey.LabelConfigurationName) RevisionTagKey = tag.MustNewKey(metricskey.LabelRevisionName) PodTagKey = tag.MustNewKey("pod_name") ContainerTagKey = tag.MustNewKey("container_name") ResponseCodeKey = tag.MustNewKey(metricskey.LabelResponseCode) ResponseCodeClassKey = tag.MustNewKey(metricskey.LabelResponseCodeClass) CommonRevisionKeys = []tag.Key{NamespaceTagKey, ServiceTagKey, ConfigTagKey, RevisionTagKey} )
Create the tag keys that will be used to add tags to our measurements. Tag keys must conform to the restrictions described in go.opencensus.io/tag/validate.go. Currently those restrictions are: - length between 1 and 255 inclusive - characters are printable US-ASCII
Functions ¶
func AugmentWithResponse ¶
AugmentWithResponse augments the given context with response-code specific tags.
func AugmentWithRevision ¶
func AugmentWithRevision(baseCtx context.Context, ns, svc, cfg, rev string) (context.Context, error)
AugmentWithRevision augments the given context with revision specific tags.
func PodContext ¶
PodContext generate a new base metric reporting context containing the respective pod specific tags.
func PodRevisionContext ¶
PodRevisionContext generates a new base metric reporting context containing the respective pod and revision specific tags.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.