Back to godoc.org
go.opentelemetry.io/collector/observability

package observability

v0.4.0
Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/collector

Index

Variables

var AllViews = []*view.View{
	ViewReceiverReceivedSpans,
	ViewReceiverDroppedSpans,
	ViewReceiverReceivedTimeSeries,
	ViewReceiverDroppedTimeSeries,
	ViewExporterReceivedSpans,
	ViewExporterDroppedSpans,
	ViewExporterReceivedLogRecords,
	ViewExporterDroppedLogRecords,
	ViewExporterReceivedTimeSeries,
	ViewExporterDroppedTimeSeries,
}

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

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

TagKeyExporter defines tag key for Exporter.

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

TagKeyReceiver defines tag key for Receiver.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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().

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier