Documentation ¶
Index ¶
- Variables
- func ContextWithExporterName(ctx context.Context, exporterName string) context.Context
- func ContextWithReceiverName(ctx context.Context, receiverName string) context.Context
- func GRPCServerWithObservabilityEnabled(extraOpts ...grpc.ServerOption) *grpc.Server
- func RecordMetricsForMetricsExporter(ctx context.Context, receivedTimeSeries int, droppedTimeSeries int)
- func RecordMetricsForMetricsReceiver(ctxWithTraceReceiverName context.Context, receivedTimeSeries int, ...)
- func RecordMetricsForTraceExporter(ctx context.Context, receivedSpans int, droppedSpans int)
- func RecordMetricsForTraceReceiver(ctxWithTraceReceiverName context.Context, receivedSpans int, droppedSpans int)
- func SetParentLink(sideCtx context.Context, span *trace.Span) bool
Constants ¶
This section is empty.
Variables ¶
var AllViews = []*view.View{ ViewReceiverReceivedSpans, ViewReceiverDroppedSpans, ViewReceiverReceivedTimeSeries, ViewReceiverDroppedTimeSeries, ViewExporterReceivedSpans, ViewExporterDroppedSpans, 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 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 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.
Functions ¶
func ContextWithExporterName ¶
ContextWithExporterName adds the tag "otelsvc_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 ¶
ContextWithReceiverName adds the tag "otelsvc_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 RecordMetricsForMetricsExporter ¶ added in v0.0.2
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 ¶ added in v0.0.2
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 ¶ added in v0.0.2
RecordMetricsForTraceExporter records the number of spans received and dropped by the exporter. Use it with a context.Context generated using ContextWithExporterName().
func RecordMetricsForTraceReceiver ¶ added in v0.0.2
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.