observability

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllViews has the views for the metrics provided by the agent.

View Source
var TagKeyExporter, _ = tag.NewKey("otelsvc_exporter")

TagKeyExporter defines tag key for Exporter.

View Source
var TagKeyReceiver, _ = tag.NewKey("otelsvc_receiver")

TagKeyReceiver defines tag key for Receiver.

View Source
var ViewExporterDroppedLogRecords = &view.View{
	Name:        mExporterDroppedLogRecords.Name(),
	Description: mExporterDroppedLogRecords.Description(),
	Measure:     mExporterDroppedLogRecords,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver, TagKeyExporter},
}

ViewExporterDroppedLogRecords defines the view for the exporter dropped logs metric.

View Source
var ViewExporterDroppedSpans = &view.View{
	Name:        mExporterDroppedSpans.Name(),
	Description: mExporterDroppedSpans.Description(),
	Measure:     mExporterDroppedSpans,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver, TagKeyExporter},
}

ViewExporterDroppedSpans defines the view for the exporter dropped spans metric.

View Source
var ViewExporterDroppedTimeSeries = &view.View{
	Name:        mExporterDroppedTimeSeries.Name(),
	Description: mExporterDroppedTimeSeries.Description(),
	Measure:     mExporterDroppedTimeSeries,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver, TagKeyExporter},
}

ViewExporterDroppedTimeSeries defines the view for the exporter dropped timeseries metric.

View Source
var ViewExporterReceivedLogRecords = &view.View{
	Name:        mExporterReceivedLogRecords.Name(),
	Description: mExporterReceivedLogRecords.Description(),
	Measure:     mExporterReceivedLogRecords,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver, TagKeyExporter},
}

ViewExporterReceivedLogRecords defines the view for the exporter received logs metric.

View Source
var ViewExporterReceivedSpans = &view.View{
	Name:        mExporterReceivedSpans.Name(),
	Description: mExporterReceivedSpans.Description(),
	Measure:     mExporterReceivedSpans,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver, TagKeyExporter},
}

ViewExporterReceivedSpans defines the view for the exporter received spans metric.

View Source
var ViewExporterReceivedTimeSeries = &view.View{
	Name:        mExporterReceivedTimeSeries.Name(),
	Description: mExporterReceivedTimeSeries.Description(),
	Measure:     mExporterReceivedTimeSeries,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver, TagKeyExporter},
}

ViewExporterReceivedTimeSeries defines the view for the exporter received timeseries metric.

View Source
var ViewReceiverDroppedSpans = &view.View{
	Name:        mReceiverDroppedSpans.Name(),
	Description: mReceiverDroppedSpans.Description(),
	Measure:     mReceiverDroppedSpans,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver},
}

ViewReceiverDroppedSpans defines the view for the receiver dropped spans metric.

View Source
var ViewReceiverDroppedTimeSeries = &view.View{
	Name:        mReceiverDroppedTimeSeries.Name(),
	Description: mReceiverDroppedTimeSeries.Description(),
	Measure:     mReceiverDroppedTimeSeries,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver},
}

ViewReceiverDroppedTimeSeries defines the view for the receiver dropped timeseries metric.

View Source
var ViewReceiverReceivedSpans = &view.View{
	Name:        mReceiverReceivedSpans.Name(),
	Description: mReceiverReceivedSpans.Description(),
	Measure:     mReceiverReceivedSpans,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver},
}

ViewReceiverReceivedSpans defines the view for the receiver received spans metric.

View Source
var ViewReceiverReceivedTimeSeries = &view.View{
	Name:        mReceiverReceivedTimeSeries.Name(),
	Description: mReceiverReceivedTimeSeries.Description(),
	Measure:     mReceiverReceivedTimeSeries,
	Aggregation: view.Sum(),
	TagKeys:     []tag.Key{TagKeyReceiver},
}

ViewReceiverReceivedTimeSeries defines the view for the receiver received timeseries metric.

Functions

func ContextWithExporterName

func ContextWithExporterName(ctx context.Context, exporterName string) context.Context

ContextWithExporterName adds the tag "exporter" and the name of the exporter as the value, and returns the newly created context. For exporters that can export multiple signals it is recommended to encode the signal as suffix (e.g. "oc_trace" and "oc_metrics").

func ContextWithReceiverName

func ContextWithReceiverName(ctx context.Context, receiverName string) context.Context

ContextWithReceiverName adds the tag "receiver" and the name of the receiver as the value, and returns the newly created context. For receivers that can receive multiple signals it is recommended to encode the signal as suffix (e.g. "oc_trace" and "oc_metrics").

func GRPCServerWithObservabilityEnabled

func GRPCServerWithObservabilityEnabled(extraOpts ...grpc.ServerOption) *grpc.Server

GRPCServerWithObservabilityEnabled creates a gRPC server that at a bare minimum has the OpenCensus ocgrpc server stats handler enabled for tracing and stats. Use it instead of invoking grpc.NewServer directly.

func RecordMetricsForLogsExporter

func RecordMetricsForLogsExporter(ctx context.Context, receivedLogs int, droppedLogs int)

RecordMetricsForLogsExporter records the number of timeseries received and dropped by the exporter. Use it with a context.Context generated using ContextWithExporterName().

func RecordMetricsForMetricsExporter

func RecordMetricsForMetricsExporter(ctx context.Context, receivedTimeSeries int, droppedTimeSeries int)

RecordMetricsForMetricsExporter records the number of timeseries received and dropped by the exporter. Use it with a context.Context generated using ContextWithExporterName().

func RecordMetricsForMetricsReceiver

func RecordMetricsForMetricsReceiver(ctxWithTraceReceiverName context.Context, receivedTimeSeries int, droppedTimeSeries int)

RecordMetricsForMetricsReceiver records the number of timeseries received and dropped by the receiver. Use it with a context.Context generated using ContextWithReceiverName().

func RecordMetricsForTraceExporter

func RecordMetricsForTraceExporter(ctx context.Context, receivedSpans int, droppedSpans int)

RecordMetricsForTraceExporter records the number of spans received and dropped by the exporter. Use it with a context.Context generated using ContextWithExporterName().

func RecordMetricsForTraceReceiver

func RecordMetricsForTraceReceiver(ctxWithTraceReceiverName context.Context, receivedSpans int, droppedSpans int)

RecordMetricsForTraceReceiver records the number of spans received and dropped by the receiver. Use it with a context.Context generated using ContextWithReceiverName().

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL