translator

package
v3.3.16 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	OCOK                 = 0
	OCCancelled          = 1
	OCUnknown            = 2
	OCInvalidArgument    = 3
	OCDeadlineExceeded   = 4
	OCNotFound           = 5
	OCAlreadyExists      = 6
	OCPermissionDenied   = 7
	OCResourceExhausted  = 8
	OCFailedPrecondition = 9
	OCAborted            = 10
	OCOutOfRange         = 11
	OCUnimplemented      = 12
	OCInternal           = 13
	OCUnavailable        = 14
	OCDataLoss           = 15
	OCUnauthenticated    = 16
)

https://github.com/googleapis/googleapis/blob/bee79fbe03254a35db125dc6d2f1e9b752b390fe/google/rpc/code.proto#L33-L186

Variables

This section is empty.

Functions

func DurationFromMicroseconds added in v3.2.1

func DurationFromMicroseconds(micros int64) time.Duration

DurationFromMicroseconds returns the number of microseconds as a duration

func FieldsFromJSONString added in v3.2.1

func FieldsFromJSONString(jStr string) []jaegerpb.KeyValue

FieldsFromJSONString returns an array of jaeger KeyValues from a json string

func GenSpanBatcherBucketID added in v3.2.1

func GenSpanBatcherBucketID(process *jaegerpb.Process) (bid [32]byte, err error)

GenSpanBatcherBucketID generates a SpanBatcher bucket id from a jaeger process

func GetLocalEndpointInfo added in v3.2.1

func GetLocalEndpointInfo(sfxSpan *trace.Span, span *jaegerpb.Span)

GetLocalEndpointInfo sets the jaeger span's local endpoint extracted from the SignalFx span

func HTTPStatusCodeFromOCStatus

func HTTPStatusCodeFromOCStatus(code int32) int32

HTTPStatusCodeFromOCStatus takes an OpenTelemetry status code and return the appropriate HTTP status code See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-http.md

func OCStatusCodeFromHTTP

func OCStatusCodeFromHTTP(code int32) int32

OCStatusCodeFromHTTP takes an HTTP status code and return the appropriate OpenTelemetry status code See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-http.md

func SAPMSpanFromSFXSpan added in v3.2.1

func SAPMSpanFromSFXSpan(sfxSpan *trace.Span, sm *spanfilter.Map) (span *jaegerpb.Span)

SAPMSpanFromSFXSpan converts an individual SignalFx format span to a SAPM span. Can return nil if input span is invalid in some way.

func SFXTagsToJaegerTags added in v3.2.1

func SFXTagsToJaegerTags(tags map[string]string, remoteEndpoint *trace.Endpoint, kind *string) ([]jaegerpb.KeyValue, []jaegerpb.KeyValue)

SFXTagsToJaegerTags returns process tags and span tags from the SignalFx span tags, endpoint (remote), and kind

func SFXToSAPMPostRequest

func SFXToSAPMPostRequest(spans []*trace.Span) (*gen.PostSpansRequest, *spanfilter.Map)

SFXToSAPMPostRequest takes a slice spans in the SignalFx format and converts it to a SAPM PostSpansRequest

func TimeFromMicrosecondsSinceEpoch added in v3.2.1

func TimeFromMicrosecondsSinceEpoch(micros int64) time.Time

TimeFromMicrosecondsSinceEpoch returns the number of microseconds since the epoch as a time.Time

Types

type SpanBatcher added in v3.2.1

type SpanBatcher struct {
	// Buckets are a map of jaeger batches with a key generated from the jaeger process
	Buckets map[[32]byte]*jaegerpb.Batch
}

SpanBatcher is simpler version of OpenTelemetry's Node Batcher. SpanBatcher takes spans and groups them into Jaeger Batches using the Span Process objects.

func (*SpanBatcher) Add added in v3.2.1

func (b *SpanBatcher) Add(span *jaegerpb.Span)

Add jaeger spans to the batcher

func (*SpanBatcher) Batches added in v3.2.1

func (b *SpanBatcher) Batches() []*jaegerpb.Batch

Batches returns an array of jaeger batches

Jump to

Keyboard shortcuts

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