Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PackObjectsMetrics ¶
type PackObjectsMetrics struct {
// contains filtered or unexported fields
}
PackObjectsMetrics is a trace2 hook that export pack-objects Prometheus metrics and stats log fields. This information is extracted by traversing the trace2 event tree.
func NewPackObjectsMetrics ¶
func NewPackObjectsMetrics() *PackObjectsMetrics
NewPackObjectsMetrics is the initializer for PackObjectsMetrics
func (*PackObjectsMetrics) Collect ¶
func (p *PackObjectsMetrics) Collect(c chan<- prometheus.Metric)
Collect collects Prometheus metrics exposed by the PackObjectsMetrics structure.
func (*PackObjectsMetrics) Describe ¶
func (p *PackObjectsMetrics) Describe(descs chan<- *prometheus.Desc)
Describe describes Prometheus metrics exposed by the PackObjectsMetrics structure.
func (*PackObjectsMetrics) Handle ¶
Handle traverses input trace2 event tree for data nodes containing relevant pack-objects data. When it finds one, it updates Prometheus objects and log fields accordingly.
func (*PackObjectsMetrics) Name ¶
func (p *PackObjectsMetrics) Name() string
Name returns the name of the hooks
type TracingExporter ¶
type TracingExporter struct{}
TracingExporter is a trace2 hook that converts the trace2 tree to corresponding distributed tracing's spans. These spans are then collected if the process initializes labkit's tracing utility.
func NewTracingExporter ¶
func NewTracingExporter() *TracingExporter
NewTracingExporter initializes TracingExporter, which is a hook to convert Trace2 events to corresponding distributed tracing
func (*TracingExporter) Handle ¶
Handle is the main method that converts each trace not in the tree to the corresponding nested span. All the spans will have `git:` prefix, followed by the operation. Trace metadata fields are copied as span tags.
func (*TracingExporter) Name ¶
func (t *TracingExporter) Name() string
Name returns the name of tracing exporter