Documentation ¶
Index ¶
- Constants
- Variables
- func AddRespStatusCodeTags(ctx context.Context, responseCode int) (context.Context, error)
- func AddTargetTags(ctx context.Context, target *config.Target) (context.Context, error)
- func EventTypeMetricValue(eventType string) string
- func StartEventProcessing(ctx context.Context) context.Context
- type BrokerCellLatencyReporter
- type ContainerName
- type DeliveryMetricsKey
- type DeliveryReporter
- type IngressReportArgs
- type IngressReporter
- type PodName
Constants ¶
View Source
const LatencyMetricName string = "brokercell_delay"
Variables ¶
View Source
var ( // 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 NamespaceNameKey = tag.MustNewKey(metricskey.LabelNamespaceName) BrokerNameKey = tag.MustNewKey(metricskey.LabelBrokerName) EventTypeKey = tag.MustNewKey(metricskey.LabelEventType) ResourceKindKey = tag.MustNewKey(labelResourceKind) ResourceNameKey = tag.MustNewKey(labelResourceName) TriggerNameKey = tag.MustNewKey(metricskey.LabelTriggerName) TriggerFilterTypeKey = tag.MustNewKey(metricskey.LabelFilterType) ResponseCodeKey = tag.MustNewKey(metricskey.LabelResponseCode) ResponseCodeClassKey = tag.MustNewKey(metricskey.LabelResponseCodeClass) PodNameKey = tag.MustNewKey(metricskey.PodName) ContainerNameKey = tag.MustNewKey(metricskey.ContainerName) )
Functions ¶
func AddRespStatusCodeTags ¶ added in v0.17.0
func AddTargetTags ¶ added in v0.16.0
func EventTypeMetricValue ¶ added in v0.16.0
Stackdriver has a limit on the cardinality of fields on a metric, and event types can be any custom string. We're reducing the allowable values on this field to be limited to GCP event types and defaulting everything else to "custom".
Types ¶
type BrokerCellLatencyReporter ¶ added in v0.17.0
type BrokerCellLatencyReporter struct {
// contains filtered or unexported fields
}
func NewBrokerCellLatencyReporter ¶ added in v0.17.0
func NewBrokerCellLatencyReporter() (*BrokerCellLatencyReporter, error)
NewBrokerCellLatencyReporter creates a new BrokerCellLatencyReporter
func (*BrokerCellLatencyReporter) ReportLatency ¶ added in v0.17.0
func (r *BrokerCellLatencyReporter) ReportLatency(ctx context.Context, duration time.Duration, resourceKind, resourceName, namespace string) error
ReportLatency records the value to the latency metric
type ContainerName ¶
type ContainerName string
type DeliveryMetricsKey ¶ added in v0.16.0
type DeliveryMetricsKey int
type DeliveryReporter ¶
type DeliveryReporter struct {
// contains filtered or unexported fields
}
func NewDeliveryReporter ¶
func NewDeliveryReporter(podName PodName, containerName ContainerName) (*DeliveryReporter, error)
NewDeliveryReporter creates a new DeliveryReporter.
func (*DeliveryReporter) FinishEventProcessing ¶ added in v0.16.0
func (r *DeliveryReporter) FinishEventProcessing(ctx context.Context) error
FinishEventProcessing captures event processing times. Requires StartDelivery to have been called previously using ctx.
func (*DeliveryReporter) ReportEventDispatchTime ¶
func (r *DeliveryReporter) ReportEventDispatchTime(ctx context.Context, d time.Duration)
ReportEventDispatchTime captures dispatch times.
type IngressReportArgs ¶
type IngressReporter ¶
type IngressReporter struct {
// contains filtered or unexported fields
}
StatsReporter reports ingress metrics.
func NewIngressReporter ¶
func NewIngressReporter(podName PodName, containerName ContainerName) (*IngressReporter, error)
NewIngressReporter creates a new StatsReporter.
func (*IngressReporter) ReportEventCount ¶ added in v0.16.0
func (r *IngressReporter) ReportEventCount(ctx context.Context, args IngressReportArgs) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.