ocagent

package module
v0.0.0-...-545a64b Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

README

ocagent_structs_no_grpc

A standalone collection of all the structs needed to export Traces and Metrics to the OpenCensus Agent as OpenCensus-Proto.

The reason for its existence to gut out the gRPC dependencies in order for golang.org/x/tools/* to use OpenCensus and have performance monitoring.

Note

Make sure to use

`"github.com/golang/protobuf/jsonpb"`

instead of

`"encoding/json"`

for JSON serialization of Proto messages.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeWithStartTime

func NodeWithStartTime(nodeName string, startTime time.Time) *commonpb.Node

NodeWithStartTime creates a node using nodeName and derives:

Hostname from the environment
Pid from the current process
StartTimestamp from the start time of this process
Language and library information.

func OpenCensusSpanDataToProtoSpans

func OpenCensusSpanDataToProtoSpans(sdl []*trace.SpanData) *agenttracepb.ExportTraceServiceRequest

OpenCensusSpanDataToProtoSpans converts OpenCensus Spans to OpenCensus-Proto Spans.

func OpenCensusViewDataToProtoMetrics

func OpenCensusViewDataToProtoMetrics(vdl []*view.Data) *agentmetricspb.ExportMetricsServiceRequest

OpenCensusViewDataToProtoMetrics converts OpenCensus ViewData to OpenCensus-Proto Metrics.

Types

This section is empty.

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

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