trace

package
v2.0.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONServiceEntrySpanTag

type JSONServiceEntrySpanTag struct {
	Key   string
	Value any
}

JSONServiceEntrySpanTag is a key value pair event that is used to tag a service entry span It will be serialized as JSON when added to the span

type NoopTagSetter

type NoopTagSetter struct{}

NoopTagSetter is a TagSetter that does nothing. Useful when no tracer Span is available, but a TagSetter is assumed.

func (NoopTagSetter) SetTag

func (NoopTagSetter) SetTag(string, any)

type ServiceEntrySpanArgs

type ServiceEntrySpanArgs struct{}

ServiceEntrySpanArgs is the arguments for a ServiceEntrySpanOperation

func (ServiceEntrySpanArgs) IsArgOf

type ServiceEntrySpanOperation

type ServiceEntrySpanOperation struct {
	dyngo.Operation
	// contains filtered or unexported fields
}

ServiceEntrySpanOperation is a dyngo.Operation that holds a the first span of a service. Usually a http or grpc span.

func StartServiceEntrySpanOperation

func StartServiceEntrySpanOperation(ctx context.Context) (*ServiceEntrySpanOperation, context.Context)

func (*ServiceEntrySpanOperation) Finish

func (op *ServiceEntrySpanOperation) Finish(span TagSetter)

func (*ServiceEntrySpanOperation) OnJSONServiceEntrySpanTagEvent

func (op *ServiceEntrySpanOperation) OnJSONServiceEntrySpanTagEvent(tag JSONServiceEntrySpanTag)

OnJSONServiceEntrySpanTagEvent is a callback that is called when a dyngo.OnData is triggered with a JSONServiceEntrySpanTag event

func (*ServiceEntrySpanOperation) OnServiceEntrySpanTagEvent

func (op *ServiceEntrySpanOperation) OnServiceEntrySpanTagEvent(tag ServiceEntrySpanTag)

OnServiceEntrySpanTagEvent is a callback that is called when a dyngo.OnData is triggered with a ServiceEntrySpanTag event

func (*ServiceEntrySpanOperation) OnServiceEntrySpanTagsBulkEvent

func (op *ServiceEntrySpanOperation) OnServiceEntrySpanTagsBulkEvent(bulk ServiceEntrySpanTagsBulk)

OnServiceEntrySpanTagsBulkEvent is a callback that is called when a dyngo.OnData is triggered with a ServiceEntrySpanTagsBulk event

func (*ServiceEntrySpanOperation) OnSpanTagEvent

func (op *ServiceEntrySpanOperation) OnSpanTagEvent(tag SpanTag)

OnSpanTagEvent is a listener for SpanTag events.

func (*ServiceEntrySpanOperation) SetSerializableTag

func (op *ServiceEntrySpanOperation) SetSerializableTag(key string, value any)

SetSerializableTag adds the key/value pair to the tags to add to the service entry span. The value MAY be serialized as JSON if necessary but simple types will not be serialized.

func (*ServiceEntrySpanOperation) SetSerializableTags

func (op *ServiceEntrySpanOperation) SetSerializableTags(tags map[string]any)

SetSerializableTags adds the key/value pairs to the tags to add to the service entry span. Values MAY be serialized as JSON if necessary but simple types will not be serialized.

func (*ServiceEntrySpanOperation) SetStringTags

func (op *ServiceEntrySpanOperation) SetStringTags(tags map[string]string)

SetStringTags fills the span tags using the key/value pairs found in `tags`

func (*ServiceEntrySpanOperation) SetTag

func (op *ServiceEntrySpanOperation) SetTag(key string, value any)

SetTag adds the key/value pair to the tags to add to the service entry span

func (*ServiceEntrySpanOperation) SetTags

func (op *ServiceEntrySpanOperation) SetTags(tags map[string]any)

SetTags fills the span tags using the key/value pairs found in `tags`

type ServiceEntrySpanTag

type ServiceEntrySpanTag struct {
	Key   string
	Value any
}

ServiceEntrySpanTag is a key value pair event that is used to tag a service entry span

type ServiceEntrySpanTagsBulk

type ServiceEntrySpanTagsBulk struct {
	Tags             []JSONServiceEntrySpanTag
	SerializableTags []JSONServiceEntrySpanTag
}

ServiceEntrySpanTagsBulk is a bulk event that is used to send tags to a service entry span

type SpanArgs

type SpanArgs struct{}

SpanArgs is the arguments for a SpanOperation

func (SpanArgs) IsArgOf

func (SpanArgs) IsArgOf(*SpanOperation)

type SpanOperation

type SpanOperation struct {
	dyngo.Operation
	// contains filtered or unexported fields
}

SpanOperation is a dyngo.Operation that holds a tracer.Span. It used as a middleware for appsec code and the tracer code hopefully some day this operation will create spans instead of simply using them

func StartSpanOperation

func StartSpanOperation(ctx context.Context) (*SpanOperation, context.Context)

func (*SpanOperation) Finish

func (op *SpanOperation) Finish(span TagSetter)

func (*SpanOperation) OnSpanTagEvent

func (op *SpanOperation) OnSpanTagEvent(tag SpanTag)

OnSpanTagEvent is a listener for SpanTag events.

func (*SpanOperation) SetTag

func (op *SpanOperation) SetTag(key string, value any)

SetTag adds the key/value pair to the tags to add to the span

type SpanTag

type SpanTag struct {
	Key   string
	Value any
}

SpanTag is a key value pair event that is used to tag the current span

type TagSetter

type TagSetter interface {
	SetTag(string, any)
}

TagSetter is the interface needed to set a span tag.

type TestTagSetter

type TestTagSetter map[string]any

func (TestTagSetter) SetTag

func (t TestTagSetter) SetTag(key string, value any)

func (TestTagSetter) Tags

func (t TestTagSetter) Tags() map[string]any

Jump to

Keyboard shortcuts

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