models

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SpanKindCLIENT captures enum value "CLIENT"
	SpanKindCLIENT string = "CLIENT"
	// SpanKindSERVER captures enum value "SERVER"
	SpanKindSERVER string = "SERVER"
	// SpanKindPRODUCER captures enum value "PRODUCER"
	SpanKindPRODUCER string = "PRODUCER"
	// SpanKindCONSUMER captures enum value "CONSUMER"
	SpanKindCONSUMER string = "CONSUMER"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {

	// Epoch **microseconds** of this event.
	//
	// For example, 1502787600000000 corresponds to 2017-08-15 09:00 UTC
	//
	// This value should be set directly by instrumentation, using the most precise
	// value possible. For example, gettimeofday or multiplying epoch millis by 1000.
	//
	Timestamp int64 `json:"timestamp,omitempty"`

	// Usually a short tag indicating an event, like "error"
	//
	// While possible to add larger data, such as garbage collection details, low
	// cardinality event names both keep the size of spans down and also are easy
	// to search against.
	//
	Value string `json:"value,omitempty"`
}

func (*Annotation) MarshalBinary

func (m *Annotation) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Annotation) UnmarshalBinary

func (m *Annotation) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Annotation) Validate

func (m *Annotation) Validate(formats strfmt.Registry) error

Validate validates this annotation

type Endpoint

type Endpoint struct {

	// The text representation of the primary IPv4 address associated with this
	// a connection. Ex. 192.168.99.100 Absent if unknown.
	//
	IPV4 strfmt.IPv4 `json:"ipv4,omitempty"`

	// The text representation of the primary IPv6 address associated with this
	// a connection. Ex. 2001:db8::c001 Absent if unknown.
	//
	// Prefer using the ipv4 field for mapped addresses.
	//
	IPV6 strfmt.IPv6 `json:"ipv6,omitempty"`

	// Depending on context, this could be a listen port or the client-side of a
	// socket. Absent if unknown
	//
	Port int64 `json:"port,omitempty"`

	// Lower-case label of this node in the service graph, such as "favstar". Leave
	// absent if unknown.
	//
	// This is a primary label for trace lookup and aggregation, so it should be
	// intuitive and consistent. Many use a name from service discovery.
	//
	ServiceName string `json:"serviceName,omitempty"`
}

func (*Endpoint) MarshalBinary

func (m *Endpoint) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Endpoint) UnmarshalBinary

func (m *Endpoint) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Endpoint) Validate

func (m *Endpoint) Validate(formats strfmt.Registry) error

Validate validates this endpoint

type ListOfSpans

type ListOfSpans []*Span

func (ListOfSpans) Validate

func (m ListOfSpans) Validate(formats strfmt.Registry) error

Validate validates this list of spans

type Span

type Span struct {

	// Associates events that explain latency with the time they happened.
	// Unique: true
	Annotations []*Annotation `json:"annotations"`

	// True is a request to store this span even if it overrides sampling policy.
	//
	// This is true when the `X-B3-Flags` header has a value of 1.
	//
	Debug bool `json:"debug,omitempty"`

	// Duration in **microseconds** of the critical path, if known. Durations of less
	// than one are rounded up. Duration of children can be longer than their parents
	// due to asynchronous operations.
	//
	// For example 150 milliseconds is 150000 microseconds.
	//
	// Minimum: 1
	Duration int64 `json:"duration,omitempty"`

	// Unique 64bit identifier for this operation within the trace.
	//
	// Encoded as 16 lowercase hex characters. For example ffdc9bb9a6453df3
	//
	// Required: true
	// Max Length: 16
	// Min Length: 16
	// Pattern: [a-z0-9]{16}
	ID *string `json:"id"`

	// When present, clarifies timestamp, duration and remoteEndpoint. When
	// absent, the span is local or incomplete. Unlike client and server,
	// there is no direct critical path latency relationship between producer
	// and consumer spans.
	//
	// * `CLIENT`
	//   * timestamp - The moment a request was sent (formerly "cs")
	//   * duration - When present indicates when a response was received (formerly "cr")
	//   * remoteEndpoint - Represents the server. Leave serviceName absent if unknown.
	// * `SERVER`
	//   * timestamp - The moment a request was received (formerly "sr")
	//   * duration - When present indicates when a response was sent (formerly "ss")
	//   * remoteEndpoint - Represents the client. Leave serviceName absent if unknown.
	// * `PRODUCER`
	//   * timestamp - The moment a message was sent to a destination (formerly "ms")
	//   * duration - When present represents delay sending the message, such as batching.
	//   * remoteEndpoint - Represents the broker. Leave serviceName absent if unknown.
	// * `CONSUMER`
	//   * timestamp - The moment a message was received from an origin (formerly "mr")
	//   * duration - When present represents delay consuming the message, such as from backlog.
	//   * remoteEndpoint - Represents the broker. Leave serviceName absent if unknown.
	//
	Kind string `json:"kind,omitempty"`

	// The host that recorded this span, primarily for query by service name.
	//
	// Instrumentation should always record this. Usually, absent implies late data.
	// The IP address corresponding to this is usually the site local or advertised
	// service address. When present, the port indicates the listen port.
	//
	LocalEndpoint *Endpoint `json:"localEndpoint,omitempty"`

	// The logical operation this span represents in lowercase (e.g. rpc method).
	// Leave absent if unknown.
	//
	// As these are lookup labels, take care to ensure names are low cardinality.
	// For example, do not embed variables into the name.
	//
	Name string `json:"name,omitempty"`

	// The parent span ID or absent if this the root span in a trace.
	// Max Length: 16
	// Min Length: 16
	// Pattern: [a-z0-9]{16}
	ParentID string `json:"parentId,omitempty"`

	// When an RPC (or messaging) span, indicates the other side of the connection.
	//
	RemoteEndpoint *Endpoint `json:"remoteEndpoint,omitempty"`

	// True if we are contributing to a span started by another tracer (ex on a different host).
	Shared bool `json:"shared,omitempty"`

	// Tags give your span context for search, viewing and analysis.
	Tags Tags `json:"tags,omitempty"`

	// Epoch **microseconds** of the start of this span, possibly absent if incomplete.
	//
	// For example, 1502787600000000 corresponds to 2017-08-15 09:00 UTC
	//
	// This value should be set directly by instrumentation, using the most precise
	// value possible. For example, gettimeofday or multiplying epoch millis by 1000.
	//
	// There are three known edge-cases where this could be reported absent.
	//  * A span was allocated but never started (ex not yet received a timestamp)
	//  * The span's start event was lost
	//  * Data about a completed span (ex tags) were sent after the fact
	//
	Timestamp int64 `json:"timestamp,omitempty"`

	// Randomly generated, unique identifier for a trace, set on all spans within it.
	//
	// Encoded as 16 or 32 lowercase hex characters corresponding to 64 or 128 bits.
	// For example, a 128bit trace ID looks like 4e441824ec2b6a44ffdc9bb9a6453df3
	//
	// Required: true
	// Max Length: 32
	// Min Length: 16
	// Pattern: [a-z0-9]{16,32}
	TraceID *string `json:"traceId"`
}

func (*Span) MarshalBinary

func (m *Span) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Span) UnmarshalBinary

func (m *Span) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Span) Validate

func (m *Span) Validate(formats strfmt.Registry) error

Validate validates this span

type Tags

type Tags map[string]string

func (Tags) Validate

func (m Tags) Validate(formats strfmt.Registry) error

Validate validates this tags

Jump to

Keyboard shortcuts

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