tempoapi

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type AnyValue

type AnyValue struct {
	// Type selects the active sum variant, switch on this field.
	Type        AnyValueType
	StringValue StringValue
	BoolValue   BoolValue
	IntValue    IntValue
	DoubleValue DoubleValue
	ArrayValue  ArrayValue
	KvlistValue KvlistValue
	BytesValue  BytesValue
}

Ref: #/components/schemas/AnyValue AnyValue represents sum type.

func NewArrayValueAnyValue

func NewArrayValueAnyValue(v ArrayValue) AnyValue

NewArrayValueAnyValue returns new AnyValue from ArrayValue.

func NewBoolValueAnyValue

func NewBoolValueAnyValue(v BoolValue) AnyValue

NewBoolValueAnyValue returns new AnyValue from BoolValue.

func NewBytesValueAnyValue

func NewBytesValueAnyValue(v BytesValue) AnyValue

NewBytesValueAnyValue returns new AnyValue from BytesValue.

func NewDoubleValueAnyValue

func NewDoubleValueAnyValue(v DoubleValue) AnyValue

NewDoubleValueAnyValue returns new AnyValue from DoubleValue.

func NewIntValueAnyValue

func NewIntValueAnyValue(v IntValue) AnyValue

NewIntValueAnyValue returns new AnyValue from IntValue.

func NewKvlistValueAnyValue

func NewKvlistValueAnyValue(v KvlistValue) AnyValue

NewKvlistValueAnyValue returns new AnyValue from KvlistValue.

func NewStringValueAnyValue

func NewStringValueAnyValue(v StringValue) AnyValue

NewStringValueAnyValue returns new AnyValue from StringValue.

func (*AnyValue) Decode

func (s *AnyValue) Decode(d *jx.Decoder) error

Decode decodes AnyValue from json.

func (AnyValue) Encode

func (s AnyValue) Encode(e *jx.Encoder)

Encode encodes AnyValue as json.

func (AnyValue) GetArrayValue

func (s AnyValue) GetArrayValue() (v ArrayValue, ok bool)

GetArrayValue returns ArrayValue and true boolean if AnyValue is ArrayValue.

func (AnyValue) GetBoolValue

func (s AnyValue) GetBoolValue() (v BoolValue, ok bool)

GetBoolValue returns BoolValue and true boolean if AnyValue is BoolValue.

func (AnyValue) GetBytesValue

func (s AnyValue) GetBytesValue() (v BytesValue, ok bool)

GetBytesValue returns BytesValue and true boolean if AnyValue is BytesValue.

func (AnyValue) GetDoubleValue

func (s AnyValue) GetDoubleValue() (v DoubleValue, ok bool)

GetDoubleValue returns DoubleValue and true boolean if AnyValue is DoubleValue.

func (AnyValue) GetIntValue

func (s AnyValue) GetIntValue() (v IntValue, ok bool)

GetIntValue returns IntValue and true boolean if AnyValue is IntValue.

func (AnyValue) GetKvlistValue

func (s AnyValue) GetKvlistValue() (v KvlistValue, ok bool)

GetKvlistValue returns KvlistValue and true boolean if AnyValue is KvlistValue.

func (AnyValue) GetStringValue

func (s AnyValue) GetStringValue() (v StringValue, ok bool)

GetStringValue returns StringValue and true boolean if AnyValue is StringValue.

func (AnyValue) IsArrayValue

func (s AnyValue) IsArrayValue() bool

IsArrayValue reports whether AnyValue is ArrayValue.

func (AnyValue) IsBoolValue

func (s AnyValue) IsBoolValue() bool

IsBoolValue reports whether AnyValue is BoolValue.

func (AnyValue) IsBytesValue

func (s AnyValue) IsBytesValue() bool

IsBytesValue reports whether AnyValue is BytesValue.

func (AnyValue) IsDoubleValue

func (s AnyValue) IsDoubleValue() bool

IsDoubleValue reports whether AnyValue is DoubleValue.

func (AnyValue) IsIntValue

func (s AnyValue) IsIntValue() bool

IsIntValue reports whether AnyValue is IntValue.

func (AnyValue) IsKvlistValue

func (s AnyValue) IsKvlistValue() bool

IsKvlistValue reports whether AnyValue is KvlistValue.

func (AnyValue) IsStringValue

func (s AnyValue) IsStringValue() bool

IsStringValue reports whether AnyValue is StringValue.

func (AnyValue) MarshalJSON

func (s AnyValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AnyValue) SetArrayValue

func (s *AnyValue) SetArrayValue(v ArrayValue)

SetArrayValue sets AnyValue to ArrayValue.

func (*AnyValue) SetBoolValue

func (s *AnyValue) SetBoolValue(v BoolValue)

SetBoolValue sets AnyValue to BoolValue.

func (*AnyValue) SetBytesValue

func (s *AnyValue) SetBytesValue(v BytesValue)

SetBytesValue sets AnyValue to BytesValue.

func (*AnyValue) SetDoubleValue

func (s *AnyValue) SetDoubleValue(v DoubleValue)

SetDoubleValue sets AnyValue to DoubleValue.

func (*AnyValue) SetIntValue

func (s *AnyValue) SetIntValue(v IntValue)

SetIntValue sets AnyValue to IntValue.

func (*AnyValue) SetKvlistValue

func (s *AnyValue) SetKvlistValue(v KvlistValue)

SetKvlistValue sets AnyValue to KvlistValue.

func (*AnyValue) SetStringValue

func (s *AnyValue) SetStringValue(v StringValue)

SetStringValue sets AnyValue to StringValue.

func (*AnyValue) UnmarshalJSON

func (s *AnyValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (AnyValue) Validate

func (s AnyValue) Validate() error

type AnyValueType

type AnyValueType string

AnyValueType is oneOf type of AnyValue.

const (
	StringValueAnyValue AnyValueType = "StringValue"
	BoolValueAnyValue   AnyValueType = "BoolValue"
	IntValueAnyValue    AnyValueType = "IntValue"
	DoubleValueAnyValue AnyValueType = "DoubleValue"
	ArrayValueAnyValue  AnyValueType = "ArrayValue"
	KvlistValueAnyValue AnyValueType = "KvlistValue"
	BytesValueAnyValue  AnyValueType = "BytesValue"
)

Possible values for AnyValueType.

type ArrayValue

type ArrayValue struct {
	ArrayValue ArrayValueItems `json:"arrayValue"`
}

Ref: #/components/schemas/ArrayValue

func (*ArrayValue) Decode

func (s *ArrayValue) Decode(d *jx.Decoder) error

Decode decodes ArrayValue from json.

func (*ArrayValue) Encode

func (s *ArrayValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ArrayValue) GetArrayValue

func (s *ArrayValue) GetArrayValue() ArrayValueItems

GetArrayValue returns the value of ArrayValue.

func (*ArrayValue) MarshalJSON

func (s *ArrayValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ArrayValue) SetArrayValue

func (s *ArrayValue) SetArrayValue(val ArrayValueItems)

SetArrayValue sets the value of ArrayValue.

func (*ArrayValue) UnmarshalJSON

func (s *ArrayValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ArrayValue) Validate

func (s *ArrayValue) Validate() error

type ArrayValueItems

type ArrayValueItems struct {
	Values []AnyValue `json:"values"`
}

Ref: #/components/schemas/ArrayValueItems

func (*ArrayValueItems) Decode

func (s *ArrayValueItems) Decode(d *jx.Decoder) error

Decode decodes ArrayValueItems from json.

func (*ArrayValueItems) Encode

func (s *ArrayValueItems) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ArrayValueItems) GetValues

func (s *ArrayValueItems) GetValues() []AnyValue

GetValues returns the value of Values.

func (*ArrayValueItems) MarshalJSON

func (s *ArrayValueItems) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ArrayValueItems) SetValues

func (s *ArrayValueItems) SetValues(val []AnyValue)

SetValues sets the value of Values.

func (*ArrayValueItems) UnmarshalJSON

func (s *ArrayValueItems) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ArrayValueItems) Validate

func (s *ArrayValueItems) Validate() error

type Attributes

type Attributes []KeyValue

func (*Attributes) Decode

func (s *Attributes) Decode(d *jx.Decoder) error

Decode decodes Attributes from json.

func (Attributes) Encode

func (s Attributes) Encode(e *jx.Encoder)

Encode encodes Attributes as json.

func (Attributes) MarshalJSON

func (s Attributes) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Attributes) UnmarshalJSON

func (s *Attributes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (Attributes) Validate

func (s Attributes) Validate() error

type BoolValue

type BoolValue struct {
	BoolValue bool `json:"boolValue"`
}

Ref: #/components/schemas/BoolValue

func (*BoolValue) Decode

func (s *BoolValue) Decode(d *jx.Decoder) error

Decode decodes BoolValue from json.

func (*BoolValue) Encode

func (s *BoolValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BoolValue) GetBoolValue

func (s *BoolValue) GetBoolValue() bool

GetBoolValue returns the value of BoolValue.

func (*BoolValue) MarshalJSON

func (s *BoolValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BoolValue) SetBoolValue

func (s *BoolValue) SetBoolValue(val bool)

SetBoolValue sets the value of BoolValue.

func (*BoolValue) UnmarshalJSON

func (s *BoolValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BytesValue

type BytesValue struct {
	BytesValue []byte `json:"bytesValue"`
}

Ref: #/components/schemas/BytesValue

func (*BytesValue) Decode

func (s *BytesValue) Decode(d *jx.Decoder) error

Decode decodes BytesValue from json.

func (*BytesValue) Encode

func (s *BytesValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BytesValue) GetBytesValue

func (s *BytesValue) GetBytesValue() []byte

GetBytesValue returns the value of BytesValue.

func (*BytesValue) MarshalJSON

func (s *BytesValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BytesValue) SetBytesValue

func (s *BytesValue) SetBytesValue(val []byte)

SetBytesValue sets the value of BytesValue.

func (*BytesValue) UnmarshalJSON

func (s *BytesValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) BuildInfo

func (c *Client) BuildInfo(ctx context.Context) (*PrometheusVersion, error)

BuildInfo invokes buildInfo operation.

Returns Tempo buildinfo, in the same format as Prometheus `/api/v1/status/buildinfo`. Used by Grafana to check Tempo API version.

GET /api/status/buildinfo

func (*Client) Echo

func (c *Client) Echo(ctx context.Context) (EchoOK, error)

Echo invokes echo operation.

Echo request for testing, issued by Grafana.

GET /api/echo

func (*Client) Query

func (c *Client) Query(ctx context.Context, params QueryParams) (*InstantMetrics, error)

Query invokes query operation.

The instant version of the Metrics API is similar to the range version, but instead returns a single value for the query.

GET /api/metrics/query

func (*Client) QueryRange

func (c *Client) QueryRange(ctx context.Context, params QueryRangeParams) (*RangeMetrics, error)

QueryRange invokes queryRange operation.

This endpoint returns Prometheus-like time-series for a given metrics query.

GET /api/metrics/query_range

func (*Client) Search

func (c *Client) Search(ctx context.Context, params SearchParams) (*Traces, error)

Search invokes search operation.

Execute TraceQL query.

GET /api/search

func (*Client) SearchTagValues

func (c *Client) SearchTagValues(ctx context.Context, params SearchTagValuesParams) (*TagValues, error)

SearchTagValues invokes searchTagValues operation.

This endpoint retrieves all discovered values for the given tag, which can be used in search.

GET /api/search/tag/{tag_name}/values

func (*Client) SearchTagValuesV2

func (c *Client) SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (*TagValuesV2, error)

SearchTagValuesV2 invokes searchTagValuesV2 operation.

This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.

GET /api/v2/search/tag/{attribute_selector}/values

func (*Client) SearchTags

func (c *Client) SearchTags(ctx context.Context, params SearchTagsParams) (*TagNames, error)

SearchTags invokes searchTags operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/search/tags

func (*Client) SearchTagsV2

func (c *Client) SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (*TagNamesV2, error)

SearchTagsV2 invokes searchTagsV2 operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/v2/search/tags

func (*Client) TraceByID

func (c *Client) TraceByID(ctx context.Context, params TraceByIDParams) (TraceByIDRes, error)

TraceByID invokes traceByID operation.

Querying traces by id.

GET /api/traces/{traceID}

func (*Client) TraceByIDv2

func (c *Client) TraceByIDv2(ctx context.Context, params TraceByIDv2Params) (TraceByIDv2Res, error)

TraceByIDv2 invokes traceByIDv2 operation.

Querying traces by id.

GET /api/v2/traces/{traceID}

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type DoubleValue

type DoubleValue struct {
	DoubleValue float64 `json:"doubleValue"`
}

Ref: #/components/schemas/DoubleValue

func (*DoubleValue) Decode

func (s *DoubleValue) Decode(d *jx.Decoder) error

Decode decodes DoubleValue from json.

func (*DoubleValue) Encode

func (s *DoubleValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DoubleValue) GetDoubleValue

func (s *DoubleValue) GetDoubleValue() float64

GetDoubleValue returns the value of DoubleValue.

func (*DoubleValue) MarshalJSON

func (s *DoubleValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DoubleValue) SetDoubleValue

func (s *DoubleValue) SetDoubleValue(val float64)

SetDoubleValue sets the value of DoubleValue.

func (*DoubleValue) UnmarshalJSON

func (s *DoubleValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DoubleValue) Validate

func (s *DoubleValue) Validate() error

type EchoOK

type EchoOK struct {
	Data io.Reader
}

func (EchoOK) Read

func (s EchoOK) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type Error

type Error string

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (Error) Encode

func (s Error) Encode(e *jx.Encoder)

Encode encodes Error as json.

func (Error) MarshalJSON

func (s Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   Error
}

ErrorStatusCode wraps Error with StatusCode.

func (*ErrorStatusCode) Error

func (s *ErrorStatusCode) Error() string

func (*ErrorStatusCode) GetResponse

func (s *ErrorStatusCode) GetResponse() Error

GetResponse returns the value of Response.

func (*ErrorStatusCode) GetStatusCode

func (s *ErrorStatusCode) GetStatusCode() int

GetStatusCode returns the value of StatusCode.

func (*ErrorStatusCode) SetResponse

func (s *ErrorStatusCode) SetResponse(val Error)

SetResponse sets the value of Response.

func (*ErrorStatusCode) SetStatusCode

func (s *ErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

type Exemplar

type Exemplar struct {
	Labels      Attributes `json:"labels"`
	TimestampMs OptInt     `json:"timestamp_ms"`
	Value       OptFloat64 `json:"value"`
}

Ref: #/components/schemas/Exemplar

func (*Exemplar) Decode

func (s *Exemplar) Decode(d *jx.Decoder) error

Decode decodes Exemplar from json.

func (*Exemplar) Encode

func (s *Exemplar) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Exemplar) GetLabels

func (s *Exemplar) GetLabels() Attributes

GetLabels returns the value of Labels.

func (*Exemplar) GetTimestampMs

func (s *Exemplar) GetTimestampMs() OptInt

GetTimestampMs returns the value of TimestampMs.

func (*Exemplar) GetValue

func (s *Exemplar) GetValue() OptFloat64

GetValue returns the value of Value.

func (*Exemplar) MarshalJSON

func (s *Exemplar) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Exemplar) SetLabels

func (s *Exemplar) SetLabels(val Attributes)

SetLabels sets the value of Labels.

func (*Exemplar) SetTimestampMs

func (s *Exemplar) SetTimestampMs(val OptInt)

SetTimestampMs sets the value of TimestampMs.

func (*Exemplar) SetValue

func (s *Exemplar) SetValue(val OptFloat64)

SetValue sets the value of Value.

func (*Exemplar) UnmarshalJSON

func (s *Exemplar) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Exemplar) Validate

func (s *Exemplar) Validate() error

type Handler

type Handler interface {
	// BuildInfo implements buildInfo operation.
	//
	// Returns Tempo buildinfo, in the same format as Prometheus `/api/v1/status/buildinfo`. Used by
	// Grafana to check Tempo API version.
	//
	// GET /api/status/buildinfo
	BuildInfo(ctx context.Context) (*PrometheusVersion, error)
	// Echo implements echo operation.
	//
	// Echo request for testing, issued by Grafana.
	//
	// GET /api/echo
	Echo(ctx context.Context) (EchoOK, error)
	// Query implements query operation.
	//
	// The instant version of the Metrics API is similar to the range version, but instead returns a single
	// value for the query.
	//
	// GET /api/metrics/query
	Query(ctx context.Context, params QueryParams) (*InstantMetrics, error)
	// QueryRange implements queryRange operation.
	//
	// This endpoint returns Prometheus-like time-series for a given metrics query.
	//
	// GET /api/metrics/query_range
	QueryRange(ctx context.Context, params QueryRangeParams) (*RangeMetrics, error)
	// Search implements search operation.
	//
	// Execute TraceQL query.
	//
	// GET /api/search
	Search(ctx context.Context, params SearchParams) (*Traces, error)
	// SearchTagValues implements searchTagValues operation.
	//
	// This endpoint retrieves all discovered values for the given tag, which can be used in search.
	//
	// GET /api/search/tag/{tag_name}/values
	SearchTagValues(ctx context.Context, params SearchTagValuesParams) (*TagValues, error)
	// SearchTagValuesV2 implements searchTagValuesV2 operation.
	//
	// This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.
	//
	// GET /api/v2/search/tag/{attribute_selector}/values
	SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (*TagValuesV2, error)
	// SearchTags implements searchTags operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/search/tags
	SearchTags(ctx context.Context, params SearchTagsParams) (*TagNames, error)
	// SearchTagsV2 implements searchTagsV2 operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/v2/search/tags
	SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (*TagNamesV2, error)
	// TraceByID implements traceByID operation.
	//
	// Querying traces by id.
	//
	// GET /api/traces/{traceID}
	TraceByID(ctx context.Context, params TraceByIDParams) (TraceByIDRes, error)
	// TraceByIDv2 implements traceByIDv2 operation.
	//
	// Querying traces by id.
	//
	// GET /api/v2/traces/{traceID}
	TraceByIDv2(ctx context.Context, params TraceByIDv2Params) (TraceByIDv2Res, error)
	// NewError creates *ErrorStatusCode from error returned by handler.
	//
	// Used for common default response.
	NewError(ctx context.Context, err error) *ErrorStatusCode
}

Handler handles operations described by OpenAPI v3 specification.

type InstantMetrics

type InstantMetrics struct {
	Series  []InstantSeries  `json:"series"`
	Metrics OptSearchMetrics `json:"metrics"`
	Status  OptPartialStatus `json:"status"`
	Message OptString        `json:"message"`
}

Ref: #/components/schemas/InstantMetrics

func (*InstantMetrics) Decode

func (s *InstantMetrics) Decode(d *jx.Decoder) error

Decode decodes InstantMetrics from json.

func (*InstantMetrics) Encode

func (s *InstantMetrics) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InstantMetrics) GetMessage

func (s *InstantMetrics) GetMessage() OptString

GetMessage returns the value of Message.

func (*InstantMetrics) GetMetrics

func (s *InstantMetrics) GetMetrics() OptSearchMetrics

GetMetrics returns the value of Metrics.

func (*InstantMetrics) GetSeries

func (s *InstantMetrics) GetSeries() []InstantSeries

GetSeries returns the value of Series.

func (*InstantMetrics) GetStatus

func (s *InstantMetrics) GetStatus() OptPartialStatus

GetStatus returns the value of Status.

func (*InstantMetrics) MarshalJSON

func (s *InstantMetrics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InstantMetrics) SetMessage

func (s *InstantMetrics) SetMessage(val OptString)

SetMessage sets the value of Message.

func (*InstantMetrics) SetMetrics

func (s *InstantMetrics) SetMetrics(val OptSearchMetrics)

SetMetrics sets the value of Metrics.

func (*InstantMetrics) SetSeries

func (s *InstantMetrics) SetSeries(val []InstantSeries)

SetSeries sets the value of Series.

func (*InstantMetrics) SetStatus

func (s *InstantMetrics) SetStatus(val OptPartialStatus)

SetStatus sets the value of Status.

func (*InstantMetrics) UnmarshalJSON

func (s *InstantMetrics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InstantMetrics) Validate

func (s *InstantMetrics) Validate() error

type InstantSeries

type InstantSeries struct {
	Labels Attributes `json:"labels"`
	Value  OptFloat64 `json:"value"`
}

Ref: #/components/schemas/InstantSeries

func (*InstantSeries) Decode

func (s *InstantSeries) Decode(d *jx.Decoder) error

Decode decodes InstantSeries from json.

func (*InstantSeries) Encode

func (s *InstantSeries) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InstantSeries) GetLabels

func (s *InstantSeries) GetLabels() Attributes

GetLabels returns the value of Labels.

func (*InstantSeries) GetValue

func (s *InstantSeries) GetValue() OptFloat64

GetValue returns the value of Value.

func (*InstantSeries) MarshalJSON

func (s *InstantSeries) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InstantSeries) SetLabels

func (s *InstantSeries) SetLabels(val Attributes)

SetLabels sets the value of Labels.

func (*InstantSeries) SetValue

func (s *InstantSeries) SetValue(val OptFloat64)

SetValue sets the value of Value.

func (*InstantSeries) UnmarshalJSON

func (s *InstantSeries) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InstantSeries) Validate

func (s *InstantSeries) Validate() error

type IntValue

type IntValue struct {
	IntValue int64 `json:"intValue"`
}

Ref: #/components/schemas/IntValue

func (*IntValue) Decode

func (s *IntValue) Decode(d *jx.Decoder) error

Decode decodes IntValue from json.

func (*IntValue) Encode

func (s *IntValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*IntValue) GetIntValue

func (s *IntValue) GetIntValue() int64

GetIntValue returns the value of IntValue.

func (*IntValue) MarshalJSON

func (s *IntValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*IntValue) SetIntValue

func (s *IntValue) SetIntValue(val int64)

SetIntValue sets the value of IntValue.

func (*IntValue) UnmarshalJSON

func (s *IntValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Invoker

type Invoker interface {
	// BuildInfo invokes buildInfo operation.
	//
	// Returns Tempo buildinfo, in the same format as Prometheus `/api/v1/status/buildinfo`. Used by
	// Grafana to check Tempo API version.
	//
	// GET /api/status/buildinfo
	BuildInfo(ctx context.Context) (*PrometheusVersion, error)
	// Echo invokes echo operation.
	//
	// Echo request for testing, issued by Grafana.
	//
	// GET /api/echo
	Echo(ctx context.Context) (EchoOK, error)
	// Query invokes query operation.
	//
	// The instant version of the Metrics API is similar to the range version, but instead returns a single
	// value for the query.
	//
	// GET /api/metrics/query
	Query(ctx context.Context, params QueryParams) (*InstantMetrics, error)
	// QueryRange invokes queryRange operation.
	//
	// This endpoint returns Prometheus-like time-series for a given metrics query.
	//
	// GET /api/metrics/query_range
	QueryRange(ctx context.Context, params QueryRangeParams) (*RangeMetrics, error)
	// Search invokes search operation.
	//
	// Execute TraceQL query.
	//
	// GET /api/search
	Search(ctx context.Context, params SearchParams) (*Traces, error)
	// SearchTagValues invokes searchTagValues operation.
	//
	// This endpoint retrieves all discovered values for the given tag, which can be used in search.
	//
	// GET /api/search/tag/{tag_name}/values
	SearchTagValues(ctx context.Context, params SearchTagValuesParams) (*TagValues, error)
	// SearchTagValuesV2 invokes searchTagValuesV2 operation.
	//
	// This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.
	//
	// GET /api/v2/search/tag/{attribute_selector}/values
	SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (*TagValuesV2, error)
	// SearchTags invokes searchTags operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/search/tags
	SearchTags(ctx context.Context, params SearchTagsParams) (*TagNames, error)
	// SearchTagsV2 invokes searchTagsV2 operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/v2/search/tags
	SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (*TagNamesV2, error)
	// TraceByID invokes traceByID operation.
	//
	// Querying traces by id.
	//
	// GET /api/traces/{traceID}
	TraceByID(ctx context.Context, params TraceByIDParams) (TraceByIDRes, error)
	// TraceByIDv2 invokes traceByIDv2 operation.
	//
	// Querying traces by id.
	//
	// GET /api/v2/traces/{traceID}
	TraceByIDv2(ctx context.Context, params TraceByIDv2Params) (TraceByIDv2Res, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type KeyValue

type KeyValue struct {
	Key   string   `json:"key"`
	Value AnyValue `json:"value"`
}

Ref: #/components/schemas/KeyValue

func (*KeyValue) Decode

func (s *KeyValue) Decode(d *jx.Decoder) error

Decode decodes KeyValue from json.

func (*KeyValue) Encode

func (s *KeyValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KeyValue) GetKey

func (s *KeyValue) GetKey() string

GetKey returns the value of Key.

func (*KeyValue) GetValue

func (s *KeyValue) GetValue() AnyValue

GetValue returns the value of Value.

func (*KeyValue) MarshalJSON

func (s *KeyValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KeyValue) SetKey

func (s *KeyValue) SetKey(val string)

SetKey sets the value of Key.

func (*KeyValue) SetValue

func (s *KeyValue) SetValue(val AnyValue)

SetValue sets the value of Value.

func (*KeyValue) UnmarshalJSON

func (s *KeyValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*KeyValue) Validate

func (s *KeyValue) Validate() error

type KvlistValue

type KvlistValue struct {
	KvlistValue KvlistValueItems `json:"kvlistValue"`
}

Ref: #/components/schemas/KvlistValue

func (*KvlistValue) Decode

func (s *KvlistValue) Decode(d *jx.Decoder) error

Decode decodes KvlistValue from json.

func (*KvlistValue) Encode

func (s *KvlistValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KvlistValue) GetKvlistValue

func (s *KvlistValue) GetKvlistValue() KvlistValueItems

GetKvlistValue returns the value of KvlistValue.

func (*KvlistValue) MarshalJSON

func (s *KvlistValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KvlistValue) SetKvlistValue

func (s *KvlistValue) SetKvlistValue(val KvlistValueItems)

SetKvlistValue sets the value of KvlistValue.

func (*KvlistValue) UnmarshalJSON

func (s *KvlistValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*KvlistValue) Validate

func (s *KvlistValue) Validate() error

type KvlistValueItems

type KvlistValueItems struct {
	Values []KeyValue `json:"values"`
}

Ref: #/components/schemas/KvlistValueItems

func (*KvlistValueItems) Decode

func (s *KvlistValueItems) Decode(d *jx.Decoder) error

Decode decodes KvlistValueItems from json.

func (*KvlistValueItems) Encode

func (s *KvlistValueItems) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KvlistValueItems) GetValues

func (s *KvlistValueItems) GetValues() []KeyValue

GetValues returns the value of Values.

func (*KvlistValueItems) MarshalJSON

func (s *KvlistValueItems) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KvlistValueItems) SetValues

func (s *KvlistValueItems) SetValues(val []KeyValue)

SetValues sets the value of Values.

func (*KvlistValueItems) UnmarshalJSON

func (s *KvlistValueItems) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*KvlistValueItems) Validate

func (s *KvlistValueItems) Validate() error

type Labeler

type Labeler struct {
	// contains filtered or unexported fields
}

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type MetadataMetrics

type MetadataMetrics struct {
	InspectedBytes  OptInt64 `json:"inspectedBytes"`
	TotalJobs       OptInt   `json:"totalJobs"`
	CompletedJobs   OptInt   `json:"completedJobs"`
	TotalBlocks     OptInt   `json:"totalBlocks"`
	TotalBlockBytes OptInt64 `json:"totalBlockBytes"`
}

Ref: #/components/schemas/MetadataMetrics

func (*MetadataMetrics) Decode

func (s *MetadataMetrics) Decode(d *jx.Decoder) error

Decode decodes MetadataMetrics from json.

func (*MetadataMetrics) Encode

func (s *MetadataMetrics) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MetadataMetrics) GetCompletedJobs

func (s *MetadataMetrics) GetCompletedJobs() OptInt

GetCompletedJobs returns the value of CompletedJobs.

func (*MetadataMetrics) GetInspectedBytes

func (s *MetadataMetrics) GetInspectedBytes() OptInt64

GetInspectedBytes returns the value of InspectedBytes.

func (*MetadataMetrics) GetTotalBlockBytes

func (s *MetadataMetrics) GetTotalBlockBytes() OptInt64

GetTotalBlockBytes returns the value of TotalBlockBytes.

func (*MetadataMetrics) GetTotalBlocks

func (s *MetadataMetrics) GetTotalBlocks() OptInt

GetTotalBlocks returns the value of TotalBlocks.

func (*MetadataMetrics) GetTotalJobs

func (s *MetadataMetrics) GetTotalJobs() OptInt

GetTotalJobs returns the value of TotalJobs.

func (*MetadataMetrics) MarshalJSON

func (s *MetadataMetrics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MetadataMetrics) SetCompletedJobs

func (s *MetadataMetrics) SetCompletedJobs(val OptInt)

SetCompletedJobs sets the value of CompletedJobs.

func (*MetadataMetrics) SetInspectedBytes

func (s *MetadataMetrics) SetInspectedBytes(val OptInt64)

SetInspectedBytes sets the value of InspectedBytes.

func (*MetadataMetrics) SetTotalBlockBytes

func (s *MetadataMetrics) SetTotalBlockBytes(val OptInt64)

SetTotalBlockBytes sets the value of TotalBlockBytes.

func (*MetadataMetrics) SetTotalBlocks

func (s *MetadataMetrics) SetTotalBlocks(val OptInt)

SetTotalBlocks sets the value of TotalBlocks.

func (*MetadataMetrics) SetTotalJobs

func (s *MetadataMetrics) SetTotalJobs(val OptInt)

SetTotalJobs sets the value of TotalJobs.

func (*MetadataMetrics) UnmarshalJSON

func (s *MetadataMetrics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	BuildInfoOperation         OperationName = "BuildInfo"
	EchoOperation              OperationName = "Echo"
	QueryOperation             OperationName = "Query"
	QueryRangeOperation        OperationName = "QueryRange"
	SearchOperation            OperationName = "Search"
	SearchTagValuesOperation   OperationName = "SearchTagValues"
	SearchTagValuesV2Operation OperationName = "SearchTagValuesV2"
	SearchTagsOperation        OperationName = "SearchTags"
	SearchTagsV2Operation      OperationName = "SearchTagsV2"
	TraceByIDOperation         OperationName = "TraceByID"
	TraceByIDv2Operation       OperationName = "TraceByIDv2"
)

type OptDuration

type OptDuration struct {
	Value time.Duration
	Set   bool
}

OptDuration is optional time.Duration.

func NewOptDuration

func NewOptDuration(v time.Duration) OptDuration

NewOptDuration returns new OptDuration with value set to v.

func (OptDuration) Get

func (o OptDuration) Get() (v time.Duration, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDuration) IsSet

func (o OptDuration) IsSet() bool

IsSet returns true if OptDuration was set.

func (OptDuration) Or

Or returns value if set, or given parameter if does not.

func (*OptDuration) Reset

func (o *OptDuration) Reset()

Reset unsets value.

func (*OptDuration) SetTo

func (o *OptDuration) SetTo(v time.Duration)

SetTo sets value to v.

type OptFloat64

type OptFloat64 struct {
	Value float64
	Set   bool
}

OptFloat64 is optional float64.

func NewOptFloat64

func NewOptFloat64(v float64) OptFloat64

NewOptFloat64 returns new OptFloat64 with value set to v.

func (*OptFloat64) Decode

func (o *OptFloat64) Decode(d *jx.Decoder) error

Decode decodes float64 from json.

func (OptFloat64) Encode

func (o OptFloat64) Encode(e *jx.Encoder)

Encode encodes float64 as json.

func (OptFloat64) Get

func (o OptFloat64) Get() (v float64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptFloat64) IsSet

func (o OptFloat64) IsSet() bool

IsSet returns true if OptFloat64 was set.

func (OptFloat64) MarshalJSON

func (s OptFloat64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFloat64) Or

func (o OptFloat64) Or(d float64) float64

Or returns value if set, or given parameter if does not.

func (*OptFloat64) Reset

func (o *OptFloat64) Reset()

Reset unsets value.

func (*OptFloat64) SetTo

func (o *OptFloat64) SetTo(v float64)

SetTo sets value to v.

func (*OptFloat64) UnmarshalJSON

func (s *OptFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt64

type OptInt64 struct {
	Value int64
	Set   bool
}

OptInt64 is optional int64.

func NewOptInt64

func NewOptInt64(v int64) OptInt64

NewOptInt64 returns new OptInt64 with value set to v.

func (*OptInt64) Decode

func (o *OptInt64) Decode(d *jx.Decoder) error

Decode decodes int64 from json.

func (OptInt64) Encode

func (o OptInt64) Encode(e *jx.Encoder)

Encode encodes int64 as json.

func (OptInt64) Get

func (o OptInt64) Get() (v int64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt64) IsSet

func (o OptInt64) IsSet() bool

IsSet returns true if OptInt64 was set.

func (OptInt64) MarshalJSON

func (s OptInt64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt64) Or

func (o OptInt64) Or(d int64) int64

Or returns value if set, or given parameter if does not.

func (*OptInt64) Reset

func (o *OptInt64) Reset()

Reset unsets value.

func (*OptInt64) SetTo

func (o *OptInt64) SetTo(v int64)

SetTo sets value to v.

func (*OptInt64) UnmarshalJSON

func (s *OptInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptMetadataMetrics

type OptMetadataMetrics struct {
	Value MetadataMetrics
	Set   bool
}

OptMetadataMetrics is optional MetadataMetrics.

func NewOptMetadataMetrics

func NewOptMetadataMetrics(v MetadataMetrics) OptMetadataMetrics

NewOptMetadataMetrics returns new OptMetadataMetrics with value set to v.

func (*OptMetadataMetrics) Decode

func (o *OptMetadataMetrics) Decode(d *jx.Decoder) error

Decode decodes MetadataMetrics from json.

func (OptMetadataMetrics) Encode

func (o OptMetadataMetrics) Encode(e *jx.Encoder)

Encode encodes MetadataMetrics as json.

func (OptMetadataMetrics) Get

func (o OptMetadataMetrics) Get() (v MetadataMetrics, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptMetadataMetrics) IsSet

func (o OptMetadataMetrics) IsSet() bool

IsSet returns true if OptMetadataMetrics was set.

func (OptMetadataMetrics) MarshalJSON

func (s OptMetadataMetrics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptMetadataMetrics) Or

Or returns value if set, or given parameter if does not.

func (*OptMetadataMetrics) Reset

func (o *OptMetadataMetrics) Reset()

Reset unsets value.

func (*OptMetadataMetrics) SetTo

func (o *OptMetadataMetrics) SetTo(v MetadataMetrics)

SetTo sets value to v.

func (*OptMetadataMetrics) UnmarshalJSON

func (s *OptMetadataMetrics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPartialStatus

type OptPartialStatus struct {
	Value PartialStatus
	Set   bool
}

OptPartialStatus is optional PartialStatus.

func NewOptPartialStatus

func NewOptPartialStatus(v PartialStatus) OptPartialStatus

NewOptPartialStatus returns new OptPartialStatus with value set to v.

func (*OptPartialStatus) Decode

func (o *OptPartialStatus) Decode(d *jx.Decoder) error

Decode decodes PartialStatus from json.

func (OptPartialStatus) Encode

func (o OptPartialStatus) Encode(e *jx.Encoder)

Encode encodes PartialStatus as json.

func (OptPartialStatus) Get

func (o OptPartialStatus) Get() (v PartialStatus, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPartialStatus) IsSet

func (o OptPartialStatus) IsSet() bool

IsSet returns true if OptPartialStatus was set.

func (OptPartialStatus) MarshalJSON

func (s OptPartialStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPartialStatus) Or

Or returns value if set, or given parameter if does not.

func (*OptPartialStatus) Reset

func (o *OptPartialStatus) Reset()

Reset unsets value.

func (*OptPartialStatus) SetTo

func (o *OptPartialStatus) SetTo(v PartialStatus)

SetTo sets value to v.

func (*OptPartialStatus) UnmarshalJSON

func (s *OptPartialStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPrometheusDuration

type OptPrometheusDuration struct {
	Value PrometheusDuration
	Set   bool
}

OptPrometheusDuration is optional PrometheusDuration.

func NewOptPrometheusDuration

func NewOptPrometheusDuration(v PrometheusDuration) OptPrometheusDuration

NewOptPrometheusDuration returns new OptPrometheusDuration with value set to v.

func (OptPrometheusDuration) Get

Get returns value and boolean that denotes whether value was set.

func (OptPrometheusDuration) IsSet

func (o OptPrometheusDuration) IsSet() bool

IsSet returns true if OptPrometheusDuration was set.

func (OptPrometheusDuration) Or

Or returns value if set, or given parameter if does not.

func (*OptPrometheusDuration) Reset

func (o *OptPrometheusDuration) Reset()

Reset unsets value.

func (*OptPrometheusDuration) SetTo

SetTo sets value to v.

type OptSearchMetrics

type OptSearchMetrics struct {
	Value SearchMetrics
	Set   bool
}

OptSearchMetrics is optional SearchMetrics.

func NewOptSearchMetrics

func NewOptSearchMetrics(v SearchMetrics) OptSearchMetrics

NewOptSearchMetrics returns new OptSearchMetrics with value set to v.

func (*OptSearchMetrics) Decode

func (o *OptSearchMetrics) Decode(d *jx.Decoder) error

Decode decodes SearchMetrics from json.

func (OptSearchMetrics) Encode

func (o OptSearchMetrics) Encode(e *jx.Encoder)

Encode encodes SearchMetrics as json.

func (OptSearchMetrics) Get

func (o OptSearchMetrics) Get() (v SearchMetrics, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptSearchMetrics) IsSet

func (o OptSearchMetrics) IsSet() bool

IsSet returns true if OptSearchMetrics was set.

func (OptSearchMetrics) MarshalJSON

func (s OptSearchMetrics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSearchMetrics) Or

Or returns value if set, or given parameter if does not.

func (*OptSearchMetrics) Reset

func (o *OptSearchMetrics) Reset()

Reset unsets value.

func (*OptSearchMetrics) SetTo

func (o *OptSearchMetrics) SetTo(v SearchMetrics)

SetTo sets value to v.

func (*OptSearchMetrics) UnmarshalJSON

func (s *OptSearchMetrics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptTagScope

type OptTagScope struct {
	Value TagScope
	Set   bool
}

OptTagScope is optional TagScope.

func NewOptTagScope

func NewOptTagScope(v TagScope) OptTagScope

NewOptTagScope returns new OptTagScope with value set to v.

func (OptTagScope) Get

func (o OptTagScope) Get() (v TagScope, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptTagScope) IsSet

func (o OptTagScope) IsSet() bool

IsSet returns true if OptTagScope was set.

func (OptTagScope) Or

func (o OptTagScope) Or(d TagScope) TagScope

Or returns value if set, or given parameter if does not.

func (*OptTagScope) Reset

func (o *OptTagScope) Reset()

Reset unsets value.

func (*OptTagScope) SetTo

func (o *OptTagScope) SetTo(v TagScope)

SetTo sets value to v.

type OptTempoSpanSet

type OptTempoSpanSet struct {
	Value TempoSpanSet
	Set   bool
}

OptTempoSpanSet is optional TempoSpanSet.

func NewOptTempoSpanSet

func NewOptTempoSpanSet(v TempoSpanSet) OptTempoSpanSet

NewOptTempoSpanSet returns new OptTempoSpanSet with value set to v.

func (*OptTempoSpanSet) Decode

func (o *OptTempoSpanSet) Decode(d *jx.Decoder) error

Decode decodes TempoSpanSet from json.

func (OptTempoSpanSet) Encode

func (o OptTempoSpanSet) Encode(e *jx.Encoder)

Encode encodes TempoSpanSet as json.

func (OptTempoSpanSet) Get

func (o OptTempoSpanSet) Get() (v TempoSpanSet, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptTempoSpanSet) IsSet

func (o OptTempoSpanSet) IsSet() bool

IsSet returns true if OptTempoSpanSet was set.

func (OptTempoSpanSet) MarshalJSON

func (s OptTempoSpanSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptTempoSpanSet) Or

Or returns value if set, or given parameter if does not.

func (*OptTempoSpanSet) Reset

func (o *OptTempoSpanSet) Reset()

Reset unsets value.

func (*OptTempoSpanSet) SetTo

func (o *OptTempoSpanSet) SetTo(v TempoSpanSet)

SetTo sets value to v.

func (*OptTempoSpanSet) UnmarshalJSON

func (s *OptTempoSpanSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptTempoTime

type OptTempoTime struct {
	Value TempoTime
	Set   bool
}

OptTempoTime is optional TempoTime.

func NewOptTempoTime

func NewOptTempoTime(v TempoTime) OptTempoTime

NewOptTempoTime returns new OptTempoTime with value set to v.

func (OptTempoTime) Get

func (o OptTempoTime) Get() (v TempoTime, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptTempoTime) IsSet

func (o OptTempoTime) IsSet() bool

IsSet returns true if OptTempoTime was set.

func (OptTempoTime) Or

Or returns value if set, or given parameter if does not.

func (*OptTempoTime) Reset

func (o *OptTempoTime) Reset()

Reset unsets value.

func (*OptTempoTime) SetTo

func (o *OptTempoTime) SetTo(v TempoTime)

SetTo sets value to v.

type OptTraceSearchMetadataServiceStats

type OptTraceSearchMetadataServiceStats struct {
	Value TraceSearchMetadataServiceStats
	Set   bool
}

OptTraceSearchMetadataServiceStats is optional TraceSearchMetadataServiceStats.

func NewOptTraceSearchMetadataServiceStats

func NewOptTraceSearchMetadataServiceStats(v TraceSearchMetadataServiceStats) OptTraceSearchMetadataServiceStats

NewOptTraceSearchMetadataServiceStats returns new OptTraceSearchMetadataServiceStats with value set to v.

func (*OptTraceSearchMetadataServiceStats) Decode

Decode decodes TraceSearchMetadataServiceStats from json.

func (OptTraceSearchMetadataServiceStats) Encode

Encode encodes TraceSearchMetadataServiceStats as json.

func (OptTraceSearchMetadataServiceStats) Get

Get returns value and boolean that denotes whether value was set.

func (OptTraceSearchMetadataServiceStats) IsSet

IsSet returns true if OptTraceSearchMetadataServiceStats was set.

func (OptTraceSearchMetadataServiceStats) MarshalJSON

func (s OptTraceSearchMetadataServiceStats) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptTraceSearchMetadataServiceStats) Or

Or returns value if set, or given parameter if does not.

func (*OptTraceSearchMetadataServiceStats) Reset

Reset unsets value.

func (*OptTraceSearchMetadataServiceStats) SetTo

SetTo sets value to v.

func (*OptTraceSearchMetadataServiceStats) UnmarshalJSON

func (s *OptTraceSearchMetadataServiceStats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithAttributes

func WithAttributes(attributes ...attribute.KeyValue) Option

WithAttributes specifies default otel attributes.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type PartialStatus

type PartialStatus int

func (*PartialStatus) Decode

func (s *PartialStatus) Decode(d *jx.Decoder) error

Decode decodes PartialStatus from json.

func (PartialStatus) Encode

func (s PartialStatus) Encode(e *jx.Encoder)

Encode encodes PartialStatus as json.

func (PartialStatus) MarshalJSON

func (s PartialStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PartialStatus) UnmarshalJSON

func (s *PartialStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PrometheusDuration

type PrometheusDuration string

func (PrometheusDuration) Validate

func (s PrometheusDuration) Validate() error

type PrometheusVersion

type PrometheusVersion struct {
	Version   string `json:"version"`
	Revision  string `json:"revision"`
	Branch    string `json:"branch"`
	BuildUser string `json:"buildUser"`
	BuildDate string `json:"buildDate"`
	GoVersion string `json:"goVersion"`
}

Ref: #/components/schemas/PrometheusVersion

func (*PrometheusVersion) Decode

func (s *PrometheusVersion) Decode(d *jx.Decoder) error

Decode decodes PrometheusVersion from json.

func (*PrometheusVersion) Encode

func (s *PrometheusVersion) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PrometheusVersion) GetBranch

func (s *PrometheusVersion) GetBranch() string

GetBranch returns the value of Branch.

func (*PrometheusVersion) GetBuildDate

func (s *PrometheusVersion) GetBuildDate() string

GetBuildDate returns the value of BuildDate.

func (*PrometheusVersion) GetBuildUser

func (s *PrometheusVersion) GetBuildUser() string

GetBuildUser returns the value of BuildUser.

func (*PrometheusVersion) GetGoVersion

func (s *PrometheusVersion) GetGoVersion() string

GetGoVersion returns the value of GoVersion.

func (*PrometheusVersion) GetRevision

func (s *PrometheusVersion) GetRevision() string

GetRevision returns the value of Revision.

func (*PrometheusVersion) GetVersion

func (s *PrometheusVersion) GetVersion() string

GetVersion returns the value of Version.

func (*PrometheusVersion) MarshalJSON

func (s *PrometheusVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PrometheusVersion) SetBranch

func (s *PrometheusVersion) SetBranch(val string)

SetBranch sets the value of Branch.

func (*PrometheusVersion) SetBuildDate

func (s *PrometheusVersion) SetBuildDate(val string)

SetBuildDate sets the value of BuildDate.

func (*PrometheusVersion) SetBuildUser

func (s *PrometheusVersion) SetBuildUser(val string)

SetBuildUser sets the value of BuildUser.

func (*PrometheusVersion) SetGoVersion

func (s *PrometheusVersion) SetGoVersion(val string)

SetGoVersion sets the value of GoVersion.

func (*PrometheusVersion) SetRevision

func (s *PrometheusVersion) SetRevision(val string)

SetRevision sets the value of Revision.

func (*PrometheusVersion) SetVersion

func (s *PrometheusVersion) SetVersion(val string)

SetVersion sets the value of Version.

func (*PrometheusVersion) UnmarshalJSON

func (s *PrometheusVersion) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type QueryParams

type QueryParams struct {
	// The TraceQL metrics query to process.
	Q string
	// Along with `end` define a time range from which tags should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which tags should be returned. Providing both `start`
	// and `end` includes blocks for the specified time range only.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since OptPrometheusDuration `json:",omitempty,omitzero"`
}

QueryParams is parameters of query operation.

type QueryRangeParams

type QueryRangeParams struct {
	// The TraceQL metrics query to process.
	Q string
	// Along with `end` define a time range from which tags should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which tags should be returned. Providing both `start`
	// and `end` includes blocks for the specified time range only.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since OptPrometheusDuration `json:",omitempty,omitzero"`
	// Defines the granularity of the returned time-series. For example, `step=15s` returns a data point
	// every 15s within the time range.
	//
	// If not specified, then the default behavior chooses a dynamic step based on the time range.
	Step OptPrometheusDuration `json:",omitempty,omitzero"`
	// Defines the maximum number of exemplars for the query.
	//
	// It's trimmed to `max_exemplars` if it exceeds it.
	Exemplars OptInt `json:",omitempty,omitzero"`
}

QueryRangeParams is parameters of queryRange operation.

type RangeMetrics

type RangeMetrics struct {
	Series  []TimeSeries     `json:"series"`
	Metrics OptSearchMetrics `json:"metrics"`
	Status  OptPartialStatus `json:"status"`
	Message OptString        `json:"message"`
}

Ref: #/components/schemas/RangeMetrics

func (*RangeMetrics) Decode

func (s *RangeMetrics) Decode(d *jx.Decoder) error

Decode decodes RangeMetrics from json.

func (*RangeMetrics) Encode

func (s *RangeMetrics) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*RangeMetrics) GetMessage

func (s *RangeMetrics) GetMessage() OptString

GetMessage returns the value of Message.

func (*RangeMetrics) GetMetrics

func (s *RangeMetrics) GetMetrics() OptSearchMetrics

GetMetrics returns the value of Metrics.

func (*RangeMetrics) GetSeries

func (s *RangeMetrics) GetSeries() []TimeSeries

GetSeries returns the value of Series.

func (*RangeMetrics) GetStatus

func (s *RangeMetrics) GetStatus() OptPartialStatus

GetStatus returns the value of Status.

func (*RangeMetrics) MarshalJSON

func (s *RangeMetrics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RangeMetrics) SetMessage

func (s *RangeMetrics) SetMessage(val OptString)

SetMessage sets the value of Message.

func (*RangeMetrics) SetMetrics

func (s *RangeMetrics) SetMetrics(val OptSearchMetrics)

SetMetrics sets the value of Metrics.

func (*RangeMetrics) SetSeries

func (s *RangeMetrics) SetSeries(val []TimeSeries)

SetSeries sets the value of Series.

func (*RangeMetrics) SetStatus

func (s *RangeMetrics) SetStatus(val OptPartialStatus)

SetStatus sets the value of Status.

func (*RangeMetrics) UnmarshalJSON

func (s *RangeMetrics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RangeMetrics) Validate

func (s *RangeMetrics) Validate() error

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationGroup

func (r Route) OperationGroup() string

OperationGroup returns the x-ogen-operation-group value.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type Sample

type Sample struct {
	TimestampMs OptInt     `json:"timestamp_ms"`
	Value       OptFloat64 `json:"value"`
}

Ref: #/components/schemas/Sample

func (*Sample) Decode

func (s *Sample) Decode(d *jx.Decoder) error

Decode decodes Sample from json.

func (*Sample) Encode

func (s *Sample) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Sample) GetTimestampMs

func (s *Sample) GetTimestampMs() OptInt

GetTimestampMs returns the value of TimestampMs.

func (*Sample) GetValue

func (s *Sample) GetValue() OptFloat64

GetValue returns the value of Value.

func (*Sample) MarshalJSON

func (s *Sample) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Sample) SetTimestampMs

func (s *Sample) SetTimestampMs(val OptInt)

SetTimestampMs sets the value of TimestampMs.

func (*Sample) SetValue

func (s *Sample) SetValue(val OptFloat64)

SetValue sets the value of Value.

func (*Sample) UnmarshalJSON

func (s *Sample) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Sample) Validate

func (s *Sample) Validate() error

type ScopeTags

type ScopeTags struct {
	Name TagScope `json:"name"`
	Tags []string `json:"tags"`
}

Ref: #/components/schemas/ScopeTags

func (*ScopeTags) Decode

func (s *ScopeTags) Decode(d *jx.Decoder) error

Decode decodes ScopeTags from json.

func (*ScopeTags) Encode

func (s *ScopeTags) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ScopeTags) GetName

func (s *ScopeTags) GetName() TagScope

GetName returns the value of Name.

func (*ScopeTags) GetTags

func (s *ScopeTags) GetTags() []string

GetTags returns the value of Tags.

func (*ScopeTags) MarshalJSON

func (s *ScopeTags) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ScopeTags) SetName

func (s *ScopeTags) SetName(val TagScope)

SetName sets the value of Name.

func (*ScopeTags) SetTags

func (s *ScopeTags) SetTags(val []string)

SetTags sets the value of Tags.

func (*ScopeTags) UnmarshalJSON

func (s *ScopeTags) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ScopeTags) Validate

func (s *ScopeTags) Validate() error

type SearchMetrics

type SearchMetrics struct {
	InspectedTraces OptInt   `json:"inspectedTraces"`
	InspectedBytes  OptInt64 `json:"inspectedBytes"`
	TotalBlocks     OptInt   `json:"totalBlocks"`
	CompletedJobs   OptInt   `json:"completedJobs"`
	TotalJobs       OptInt   `json:"totalJobs"`
	TotalBlockBytes OptInt64 `json:"totalBlockBytes"`
	InspectedSpans  OptInt64 `json:"inspectedSpans"`
}

Ref: #/components/schemas/SearchMetrics

func (*SearchMetrics) Decode

func (s *SearchMetrics) Decode(d *jx.Decoder) error

Decode decodes SearchMetrics from json.

func (*SearchMetrics) Encode

func (s *SearchMetrics) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SearchMetrics) GetCompletedJobs

func (s *SearchMetrics) GetCompletedJobs() OptInt

GetCompletedJobs returns the value of CompletedJobs.

func (*SearchMetrics) GetInspectedBytes

func (s *SearchMetrics) GetInspectedBytes() OptInt64

GetInspectedBytes returns the value of InspectedBytes.

func (*SearchMetrics) GetInspectedSpans

func (s *SearchMetrics) GetInspectedSpans() OptInt64

GetInspectedSpans returns the value of InspectedSpans.

func (*SearchMetrics) GetInspectedTraces

func (s *SearchMetrics) GetInspectedTraces() OptInt

GetInspectedTraces returns the value of InspectedTraces.

func (*SearchMetrics) GetTotalBlockBytes

func (s *SearchMetrics) GetTotalBlockBytes() OptInt64

GetTotalBlockBytes returns the value of TotalBlockBytes.

func (*SearchMetrics) GetTotalBlocks

func (s *SearchMetrics) GetTotalBlocks() OptInt

GetTotalBlocks returns the value of TotalBlocks.

func (*SearchMetrics) GetTotalJobs

func (s *SearchMetrics) GetTotalJobs() OptInt

GetTotalJobs returns the value of TotalJobs.

func (*SearchMetrics) MarshalJSON

func (s *SearchMetrics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SearchMetrics) SetCompletedJobs

func (s *SearchMetrics) SetCompletedJobs(val OptInt)

SetCompletedJobs sets the value of CompletedJobs.

func (*SearchMetrics) SetInspectedBytes

func (s *SearchMetrics) SetInspectedBytes(val OptInt64)

SetInspectedBytes sets the value of InspectedBytes.

func (*SearchMetrics) SetInspectedSpans

func (s *SearchMetrics) SetInspectedSpans(val OptInt64)

SetInspectedSpans sets the value of InspectedSpans.

func (*SearchMetrics) SetInspectedTraces

func (s *SearchMetrics) SetInspectedTraces(val OptInt)

SetInspectedTraces sets the value of InspectedTraces.

func (*SearchMetrics) SetTotalBlockBytes

func (s *SearchMetrics) SetTotalBlockBytes(val OptInt64)

SetTotalBlockBytes sets the value of TotalBlockBytes.

func (*SearchMetrics) SetTotalBlocks

func (s *SearchMetrics) SetTotalBlocks(val OptInt)

SetTotalBlocks sets the value of TotalBlocks.

func (*SearchMetrics) SetTotalJobs

func (s *SearchMetrics) SetTotalJobs(val OptInt)

SetTotalJobs sets the value of TotalJobs.

func (*SearchMetrics) UnmarshalJSON

func (s *SearchMetrics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SearchParams

type SearchParams struct {
	// URL-encoded TraceQL query.
	Q OptString `json:",omitempty,omitzero"`
	// Logfmt encoding of any span-level or process-level attributes to filter on. The value is matched as
	// a case-insensitive substring. Key-value pairs are separated by spaces. If a value contains a space,
	// it should be enclosed within double quotes.
	Tags OptString `json:",omitempty,omitzero"`
	// Find traces with at least this duration. Duration values are of the form 10s for 10 seconds, 100ms,
	// 30m, etc.
	MinDuration OptDuration `json:",omitempty,omitzero"`
	// Find traces with no greater than this duration. Uses the same form as `minDuration`.
	MaxDuration OptDuration `json:",omitempty,omitzero"`
	// Limit the number of search results. Default is 20, but this is configurable in the querier. Refer to
	// Configuration.
	Limit OptInt `json:",omitempty,omitzero"`
	// Along with `end` define a time range from which traces should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start`, define a time range from which traces should be returned. Providing both `start`
	// and `end` will change the way that Tempo searches. If the parameters are not provided, then Tempo
	// will search the recent trace data stored in the ingesters. If the parameters are provided, it will
	// search the backend as well.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since OptPrometheusDuration `json:",omitempty,omitzero"`
	// Limit the number of spans per span-set. Default value is 3.
	Spss OptInt `json:",omitempty,omitzero"`
}

SearchParams is parameters of search operation.

type SearchTagValuesParams

type SearchTagValuesParams struct {
	// Tag name.
	TagName string
	// If provided, the tag values returned by the API are filtered to only return values seen on spans
	// matching your filter parameters. Queries can be incomplete: for example, `{ .cluster = }`. Tempo
	// extracts only the valid matchers and build a valid query.
	//
	// Only queries with a single selector `{}“ and AND `&&` operators are supported.
	//
	//  - Example supported: `{ .cluster = "us-east-1" && .service = "frontend" }`
	//  - Example unsupported:
	//    `{ .cluster = "us-east-1" || .service = "frontend" } && { .cluster = "us-east-2" }`
	Q OptString `json:",omitempty,omitzero"`
	// Along with `end` define a time range from which tags should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which tags should be returned. Providing both `start`
	// and `end` includes blocks for the specified time range only.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since OptPrometheusDuration `json:",omitempty,omitzero"`
}

SearchTagValuesParams is parameters of searchTagValues operation.

type SearchTagValuesV2Params

type SearchTagValuesV2Params struct {
	// TraceQL attribute selector (`.service.name`, `resource.service.name`, etc.).
	AttributeSelector string
	// If provided, the tag values returned by the API are filtered to only return values seen on spans
	// matching your filter parameters. Queries can be incomplete: for example, `{ .cluster = }`. Tempo
	// extracts only the valid matchers and build a valid query.
	//
	// Only queries with a single selector `{}“ and AND `&&` operators are supported.
	//
	//  - Example supported: `{ .cluster = "us-east-1" && .service = "frontend" }`
	//  - Example unsupported:
	//    `{ .cluster = "us-east-1" || .service = "frontend" } && { .cluster = "us-east-2" }`
	Q OptString `json:",omitempty,omitzero"`
	// Along with `end` define a time range from which tags should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which tags should be returned. Providing both `start`
	// and `end` includes blocks for the specified time range only.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since OptPrometheusDuration `json:",omitempty,omitzero"`
}

SearchTagValuesV2Params is parameters of searchTagValuesV2 operation.

type SearchTagsParams

type SearchTagsParams struct {
	// Specifies the scope of the tags, this is an optional parameter, if not specified it means all
	// scopes.
	Scope OptTagScope `json:",omitempty,omitzero"`
	// Along with `end` define a time range from which tags should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which tags should be returned. Providing both `start`
	// and `end` includes blocks for the specified time range only.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since OptPrometheusDuration `json:",omitempty,omitzero"`
}

SearchTagsParams is parameters of searchTags operation.

type SearchTagsV2Params

type SearchTagsV2Params struct {
	// A TraceQL query to filter tag names by.
	Q OptString `json:",omitempty,omitzero"`
	// Specifies the scope of the tags, this is an optional parameter, if not specified it means all
	// scopes.
	Scope OptTagScope `json:",omitempty,omitzero"`
	// Along with `end` define a time range from which tags should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which tags should be returned. Providing both `start`
	// and `end` includes blocks for the specified time range only.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since OptPrometheusDuration `json:",omitempty,omitzero"`
	// Sets the maximum number of tags names allowed per scope. The query stops once this limit is reached
	// for any scope.
	Limit OptInt `json:",omitempty,omitzero"`
}

SearchTagsV2Params is parameters of searchTagsV2 operation.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type ServiceStats

type ServiceStats struct {
	SpanCount  OptInt `json:"spanCount"`
	ErrorCount OptInt `json:"errorCount"`
}

Ref: #/components/schemas/ServiceStats

func (*ServiceStats) Decode

func (s *ServiceStats) Decode(d *jx.Decoder) error

Decode decodes ServiceStats from json.

func (*ServiceStats) Encode

func (s *ServiceStats) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServiceStats) GetErrorCount

func (s *ServiceStats) GetErrorCount() OptInt

GetErrorCount returns the value of ErrorCount.

func (*ServiceStats) GetSpanCount

func (s *ServiceStats) GetSpanCount() OptInt

GetSpanCount returns the value of SpanCount.

func (*ServiceStats) MarshalJSON

func (s *ServiceStats) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServiceStats) SetErrorCount

func (s *ServiceStats) SetErrorCount(val OptInt)

SetErrorCount sets the value of ErrorCount.

func (*ServiceStats) SetSpanCount

func (s *ServiceStats) SetSpanCount(val OptInt)

SetSpanCount sets the value of SpanCount.

func (*ServiceStats) UnmarshalJSON

func (s *ServiceStats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type StringValue

type StringValue struct {
	StringValue string `json:"stringValue"`
}

Ref: #/components/schemas/StringValue

func (*StringValue) Decode

func (s *StringValue) Decode(d *jx.Decoder) error

Decode decodes StringValue from json.

func (*StringValue) Encode

func (s *StringValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StringValue) GetStringValue

func (s *StringValue) GetStringValue() string

GetStringValue returns the value of StringValue.

func (*StringValue) MarshalJSON

func (s *StringValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StringValue) SetStringValue

func (s *StringValue) SetStringValue(val string)

SetStringValue sets the value of StringValue.

func (*StringValue) UnmarshalJSON

func (s *StringValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagNames

type TagNames struct {
	TagNames []string           `json:"tagNames"`
	Metrics  OptMetadataMetrics `json:"metrics"`
}

Ref: #/components/schemas/TagNames

func (*TagNames) Decode

func (s *TagNames) Decode(d *jx.Decoder) error

Decode decodes TagNames from json.

func (*TagNames) Encode

func (s *TagNames) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagNames) GetMetrics

func (s *TagNames) GetMetrics() OptMetadataMetrics

GetMetrics returns the value of Metrics.

func (*TagNames) GetTagNames

func (s *TagNames) GetTagNames() []string

GetTagNames returns the value of TagNames.

func (*TagNames) MarshalJSON

func (s *TagNames) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagNames) SetMetrics

func (s *TagNames) SetMetrics(val OptMetadataMetrics)

SetMetrics sets the value of Metrics.

func (*TagNames) SetTagNames

func (s *TagNames) SetTagNames(val []string)

SetTagNames sets the value of TagNames.

func (*TagNames) UnmarshalJSON

func (s *TagNames) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagNamesV2

type TagNamesV2 struct {
	Scopes  []ScopeTags        `json:"scopes"`
	Metrics OptMetadataMetrics `json:"metrics"`
}

Ref: #/components/schemas/TagNamesV2

func (*TagNamesV2) Decode

func (s *TagNamesV2) Decode(d *jx.Decoder) error

Decode decodes TagNamesV2 from json.

func (*TagNamesV2) Encode

func (s *TagNamesV2) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagNamesV2) GetMetrics

func (s *TagNamesV2) GetMetrics() OptMetadataMetrics

GetMetrics returns the value of Metrics.

func (*TagNamesV2) GetScopes

func (s *TagNamesV2) GetScopes() []ScopeTags

GetScopes returns the value of Scopes.

func (*TagNamesV2) MarshalJSON

func (s *TagNamesV2) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagNamesV2) SetMetrics

func (s *TagNamesV2) SetMetrics(val OptMetadataMetrics)

SetMetrics sets the value of Metrics.

func (*TagNamesV2) SetScopes

func (s *TagNamesV2) SetScopes(val []ScopeTags)

SetScopes sets the value of Scopes.

func (*TagNamesV2) UnmarshalJSON

func (s *TagNamesV2) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TagNamesV2) Validate

func (s *TagNamesV2) Validate() error

type TagScope

type TagScope string

Ref: #/components/schemas/TagScope

const (
	TagScopeNone            TagScope = "none"
	TagScopeAll             TagScope = "all"
	TagScopeInstrumentation TagScope = "instrumentation"
	TagScopeResource        TagScope = "resource"
	TagScopeSpan            TagScope = "span"
	TagScopeIntrinsic       TagScope = "intrinsic"
	TagScopeEvent           TagScope = "event"
	TagScopeLink            TagScope = "link"
)

func (TagScope) AllValues

func (TagScope) AllValues() []TagScope

AllValues returns all TagScope values.

func (*TagScope) Decode

func (s *TagScope) Decode(d *jx.Decoder) error

Decode decodes TagScope from json.

func (TagScope) Encode

func (s TagScope) Encode(e *jx.Encoder)

Encode encodes TagScope as json.

func (TagScope) MarshalJSON

func (s TagScope) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (TagScope) MarshalText

func (s TagScope) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*TagScope) UnmarshalJSON

func (s *TagScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TagScope) UnmarshalText

func (s *TagScope) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (TagScope) Validate

func (s TagScope) Validate() error

type TagValue

type TagValue struct {
	Type  string    `json:"type"`
	Value OptString `json:"value"`
}

Ref: #/components/schemas/TagValue

func (*TagValue) Decode

func (s *TagValue) Decode(d *jx.Decoder) error

Decode decodes TagValue from json.

func (*TagValue) Encode

func (s *TagValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagValue) GetType

func (s *TagValue) GetType() string

GetType returns the value of Type.

func (*TagValue) GetValue

func (s *TagValue) GetValue() OptString

GetValue returns the value of Value.

func (*TagValue) MarshalJSON

func (s *TagValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagValue) SetType

func (s *TagValue) SetType(val string)

SetType sets the value of Type.

func (*TagValue) SetValue

func (s *TagValue) SetValue(val OptString)

SetValue sets the value of Value.

func (*TagValue) UnmarshalJSON

func (s *TagValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagValues

type TagValues struct {
	TagValues []string           `json:"tagValues"`
	Metrics   OptMetadataMetrics `json:"metrics"`
}

Ref: #/components/schemas/TagValues

func (*TagValues) Decode

func (s *TagValues) Decode(d *jx.Decoder) error

Decode decodes TagValues from json.

func (*TagValues) Encode

func (s *TagValues) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagValues) GetMetrics

func (s *TagValues) GetMetrics() OptMetadataMetrics

GetMetrics returns the value of Metrics.

func (*TagValues) GetTagValues

func (s *TagValues) GetTagValues() []string

GetTagValues returns the value of TagValues.

func (*TagValues) MarshalJSON

func (s *TagValues) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagValues) SetMetrics

func (s *TagValues) SetMetrics(val OptMetadataMetrics)

SetMetrics sets the value of Metrics.

func (*TagValues) SetTagValues

func (s *TagValues) SetTagValues(val []string)

SetTagValues sets the value of TagValues.

func (*TagValues) UnmarshalJSON

func (s *TagValues) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagValuesV2

type TagValuesV2 struct {
	TagValues []TagValue         `json:"tagValues"`
	Metrics   OptMetadataMetrics `json:"metrics"`
}

Ref: #/components/schemas/TagValuesV2

func (*TagValuesV2) Decode

func (s *TagValuesV2) Decode(d *jx.Decoder) error

Decode decodes TagValuesV2 from json.

func (*TagValuesV2) Encode

func (s *TagValuesV2) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagValuesV2) GetMetrics

func (s *TagValuesV2) GetMetrics() OptMetadataMetrics

GetMetrics returns the value of Metrics.

func (*TagValuesV2) GetTagValues

func (s *TagValuesV2) GetTagValues() []TagValue

GetTagValues returns the value of TagValues.

func (*TagValuesV2) MarshalJSON

func (s *TagValuesV2) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagValuesV2) SetMetrics

func (s *TagValuesV2) SetMetrics(val OptMetadataMetrics)

SetMetrics sets the value of Metrics.

func (*TagValuesV2) SetTagValues

func (s *TagValuesV2) SetTagValues(val []TagValue)

SetTagValues sets the value of TagValues.

func (*TagValuesV2) UnmarshalJSON

func (s *TagValuesV2) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TempoSpan

type TempoSpan struct {
	SpanID            string     `json:"spanID"`
	Name              OptString  `json:"name"`
	StartTimeUnixNano time.Time  `json:"startTimeUnixNano"`
	DurationNanos     int64      `json:"durationNanos"`
	Attributes        Attributes `json:"attributes"`
}

Ref: #/components/schemas/TempoSpan

func (*TempoSpan) Decode

func (s *TempoSpan) Decode(d *jx.Decoder) error

Decode decodes TempoSpan from json.

func (*TempoSpan) Encode

func (s *TempoSpan) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TempoSpan) GetAttributes

func (s *TempoSpan) GetAttributes() Attributes

GetAttributes returns the value of Attributes.

func (*TempoSpan) GetDurationNanos

func (s *TempoSpan) GetDurationNanos() int64

GetDurationNanos returns the value of DurationNanos.

func (*TempoSpan) GetName

func (s *TempoSpan) GetName() OptString

GetName returns the value of Name.

func (*TempoSpan) GetSpanID

func (s *TempoSpan) GetSpanID() string

GetSpanID returns the value of SpanID.

func (*TempoSpan) GetStartTimeUnixNano

func (s *TempoSpan) GetStartTimeUnixNano() time.Time

GetStartTimeUnixNano returns the value of StartTimeUnixNano.

func (*TempoSpan) MarshalJSON

func (s *TempoSpan) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TempoSpan) SetAttributes

func (s *TempoSpan) SetAttributes(val Attributes)

SetAttributes sets the value of Attributes.

func (*TempoSpan) SetDurationNanos

func (s *TempoSpan) SetDurationNanos(val int64)

SetDurationNanos sets the value of DurationNanos.

func (*TempoSpan) SetName

func (s *TempoSpan) SetName(val OptString)

SetName sets the value of Name.

func (*TempoSpan) SetSpanID

func (s *TempoSpan) SetSpanID(val string)

SetSpanID sets the value of SpanID.

func (*TempoSpan) SetStartTimeUnixNano

func (s *TempoSpan) SetStartTimeUnixNano(val time.Time)

SetStartTimeUnixNano sets the value of StartTimeUnixNano.

func (*TempoSpan) UnmarshalJSON

func (s *TempoSpan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TempoSpan) Validate

func (s *TempoSpan) Validate() error

type TempoSpanSet

type TempoSpanSet struct {
	Spans      []TempoSpan `json:"spans"`
	Matched    OptInt      `json:"matched"`
	Attributes Attributes  `json:"attributes"`
}

Ref: #/components/schemas/TempoSpanSet

func (*TempoSpanSet) Decode

func (s *TempoSpanSet) Decode(d *jx.Decoder) error

Decode decodes TempoSpanSet from json.

func (*TempoSpanSet) Encode

func (s *TempoSpanSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TempoSpanSet) GetAttributes

func (s *TempoSpanSet) GetAttributes() Attributes

GetAttributes returns the value of Attributes.

func (*TempoSpanSet) GetMatched

func (s *TempoSpanSet) GetMatched() OptInt

GetMatched returns the value of Matched.

func (*TempoSpanSet) GetSpans

func (s *TempoSpanSet) GetSpans() []TempoSpan

GetSpans returns the value of Spans.

func (*TempoSpanSet) MarshalJSON

func (s *TempoSpanSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TempoSpanSet) SetAttributes

func (s *TempoSpanSet) SetAttributes(val Attributes)

SetAttributes sets the value of Attributes.

func (*TempoSpanSet) SetMatched

func (s *TempoSpanSet) SetMatched(val OptInt)

SetMatched sets the value of Matched.

func (*TempoSpanSet) SetSpans

func (s *TempoSpanSet) SetSpans(val []TempoSpan)

SetSpans sets the value of Spans.

func (*TempoSpanSet) UnmarshalJSON

func (s *TempoSpanSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TempoSpanSet) Validate

func (s *TempoSpanSet) Validate() error

type TempoTime

type TempoTime string

type TimeSeries

type TimeSeries struct {
	Labels    Attributes `json:"labels"`
	Samples   []Sample   `json:"samples"`
	Exemplars []Exemplar `json:"exemplars"`
}

Ref: #/components/schemas/TimeSeries

func (*TimeSeries) Decode

func (s *TimeSeries) Decode(d *jx.Decoder) error

Decode decodes TimeSeries from json.

func (*TimeSeries) Encode

func (s *TimeSeries) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TimeSeries) GetExemplars

func (s *TimeSeries) GetExemplars() []Exemplar

GetExemplars returns the value of Exemplars.

func (*TimeSeries) GetLabels

func (s *TimeSeries) GetLabels() Attributes

GetLabels returns the value of Labels.

func (*TimeSeries) GetSamples

func (s *TimeSeries) GetSamples() []Sample

GetSamples returns the value of Samples.

func (*TimeSeries) MarshalJSON

func (s *TimeSeries) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TimeSeries) SetExemplars

func (s *TimeSeries) SetExemplars(val []Exemplar)

SetExemplars sets the value of Exemplars.

func (*TimeSeries) SetLabels

func (s *TimeSeries) SetLabels(val Attributes)

SetLabels sets the value of Labels.

func (*TimeSeries) SetSamples

func (s *TimeSeries) SetSamples(val []Sample)

SetSamples sets the value of Samples.

func (*TimeSeries) UnmarshalJSON

func (s *TimeSeries) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TimeSeries) Validate

func (s *TimeSeries) Validate() error

type TraceByID

type TraceByID struct {
	Data io.Reader
}

func (TraceByID) Read

func (s TraceByID) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type TraceByIDNotFound

type TraceByIDNotFound struct{}

Ref: #/components/responses/TraceByIDNotFound

type TraceByIDParams

type TraceByIDParams struct {
	// TraceID to query.
	TraceID string
	// Along with `end` define a time range from which traces should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which traces should be returned. Providing both `start`
	// and `end` will include traces for the specified time range only. If the parameters are not provided
	// then Tempo will check for the trace across all blocks in backend. If the parameters are provided, it
	// will only check in the blocks within the specified time range, this can result in trace not being
	// found or partial results if it does not fall in the specified time range.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since  OptPrometheusDuration `json:",omitempty,omitzero"`
	Accept string
}

TraceByIDParams is parameters of traceByID operation.

type TraceByIDRes

type TraceByIDRes interface {
	// contains filtered or unexported methods
}

type TraceByIDV2

type TraceByIDV2 struct {
	Data io.Reader
}

func (TraceByIDV2) Read

func (s TraceByIDV2) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type TraceByIDV2Headers

type TraceByIDV2Headers struct {
	ContentType string
	Response    TraceByIDV2
}

TraceByIDV2Headers wraps TraceByIDV2 with response headers.

func (*TraceByIDV2Headers) GetContentType

func (s *TraceByIDV2Headers) GetContentType() string

GetContentType returns the value of ContentType.

func (*TraceByIDV2Headers) GetResponse

func (s *TraceByIDV2Headers) GetResponse() TraceByIDV2

GetResponse returns the value of Response.

func (*TraceByIDV2Headers) SetContentType

func (s *TraceByIDV2Headers) SetContentType(val string)

SetContentType sets the value of ContentType.

func (*TraceByIDV2Headers) SetResponse

func (s *TraceByIDV2Headers) SetResponse(val TraceByIDV2)

SetResponse sets the value of Response.

type TraceByIDV2NotFound

type TraceByIDV2NotFound struct{}

Ref: #/components/responses/TraceByIDV2NotFound

type TraceByIDv2Params

type TraceByIDv2Params struct {
	// TraceID to query.
	TraceID string
	// Along with `end` define a time range from which traces should be returned.
	Start OptTempoTime `json:",omitempty,omitzero"`
	// Along with `start` define a time range from which traces should be returned. Providing both `start`
	// and `end` will include traces for the specified time range only. If the parameters are not provided
	// then Tempo will check for the trace across all blocks in backend. If the parameters are provided, it
	// will only check in the blocks within the specified time range, this can result in trace not being
	// found or partial results if it does not fall in the specified time range.
	End OptTempoTime `json:",omitempty,omitzero"`
	// Can be used instead of `start` and `end` to define the time range in relative values. For example,
	// `since=15m` queries the last 15 minutes.
	//
	// Default is the last 1 hour.
	Since  OptPrometheusDuration `json:",omitempty,omitzero"`
	Accept OptString             `json:",omitempty,omitzero"`
}

TraceByIDv2Params is parameters of traceByIDv2 operation.

type TraceByIDv2Res

type TraceByIDv2Res interface {
	// contains filtered or unexported methods
}

type TraceSearchMetadata

type TraceSearchMetadata struct {
	TraceID           string                             `json:"traceID"`
	RootServiceName   OptString                          `json:"rootServiceName"`
	RootTraceName     OptString                          `json:"rootTraceName"`
	StartTimeUnixNano time.Time                          `json:"startTimeUnixNano"`
	DurationMs        OptInt                             `json:"durationMs"`
	SpanSet           OptTempoSpanSet                    `json:"spanSet"`
	SpanSets          []TempoSpanSet                     `json:"spanSets"`
	ServiceStats      OptTraceSearchMetadataServiceStats `json:"serviceStats"`
}

Ref: #/components/schemas/TraceSearchMetadata

func (*TraceSearchMetadata) Decode

func (s *TraceSearchMetadata) Decode(d *jx.Decoder) error

Decode decodes TraceSearchMetadata from json.

func (*TraceSearchMetadata) Encode

func (s *TraceSearchMetadata) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TraceSearchMetadata) GetDurationMs

func (s *TraceSearchMetadata) GetDurationMs() OptInt

GetDurationMs returns the value of DurationMs.

func (*TraceSearchMetadata) GetRootServiceName

func (s *TraceSearchMetadata) GetRootServiceName() OptString

GetRootServiceName returns the value of RootServiceName.

func (*TraceSearchMetadata) GetRootTraceName

func (s *TraceSearchMetadata) GetRootTraceName() OptString

GetRootTraceName returns the value of RootTraceName.

func (*TraceSearchMetadata) GetServiceStats

GetServiceStats returns the value of ServiceStats.

func (*TraceSearchMetadata) GetSpanSet

func (s *TraceSearchMetadata) GetSpanSet() OptTempoSpanSet

GetSpanSet returns the value of SpanSet.

func (*TraceSearchMetadata) GetSpanSets

func (s *TraceSearchMetadata) GetSpanSets() []TempoSpanSet

GetSpanSets returns the value of SpanSets.

func (*TraceSearchMetadata) GetStartTimeUnixNano

func (s *TraceSearchMetadata) GetStartTimeUnixNano() time.Time

GetStartTimeUnixNano returns the value of StartTimeUnixNano.

func (*TraceSearchMetadata) GetTraceID

func (s *TraceSearchMetadata) GetTraceID() string

GetTraceID returns the value of TraceID.

func (*TraceSearchMetadata) MarshalJSON

func (s *TraceSearchMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TraceSearchMetadata) SetDurationMs

func (s *TraceSearchMetadata) SetDurationMs(val OptInt)

SetDurationMs sets the value of DurationMs.

func (*TraceSearchMetadata) SetRootServiceName

func (s *TraceSearchMetadata) SetRootServiceName(val OptString)

SetRootServiceName sets the value of RootServiceName.

func (*TraceSearchMetadata) SetRootTraceName

func (s *TraceSearchMetadata) SetRootTraceName(val OptString)

SetRootTraceName sets the value of RootTraceName.

func (*TraceSearchMetadata) SetServiceStats

SetServiceStats sets the value of ServiceStats.

func (*TraceSearchMetadata) SetSpanSet

func (s *TraceSearchMetadata) SetSpanSet(val OptTempoSpanSet)

SetSpanSet sets the value of SpanSet.

func (*TraceSearchMetadata) SetSpanSets

func (s *TraceSearchMetadata) SetSpanSets(val []TempoSpanSet)

SetSpanSets sets the value of SpanSets.

func (*TraceSearchMetadata) SetStartTimeUnixNano

func (s *TraceSearchMetadata) SetStartTimeUnixNano(val time.Time)

SetStartTimeUnixNano sets the value of StartTimeUnixNano.

func (*TraceSearchMetadata) SetTraceID

func (s *TraceSearchMetadata) SetTraceID(val string)

SetTraceID sets the value of TraceID.

func (*TraceSearchMetadata) UnmarshalJSON

func (s *TraceSearchMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TraceSearchMetadata) Validate

func (s *TraceSearchMetadata) Validate() error

type TraceSearchMetadataServiceStats

type TraceSearchMetadataServiceStats map[string]ServiceStats

func (*TraceSearchMetadataServiceStats) Decode

Decode decodes TraceSearchMetadataServiceStats from json.

func (TraceSearchMetadataServiceStats) Encode

Encode implements json.Marshaler.

func (TraceSearchMetadataServiceStats) MarshalJSON

func (s TraceSearchMetadataServiceStats) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TraceSearchMetadataServiceStats) UnmarshalJSON

func (s *TraceSearchMetadataServiceStats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Traces

type Traces struct {
	Traces  []TraceSearchMetadata `json:"traces"`
	Metrics OptSearchMetrics      `json:"metrics"`
}

Ref: #/components/schemas/Traces

func (*Traces) Decode

func (s *Traces) Decode(d *jx.Decoder) error

Decode decodes Traces from json.

func (*Traces) Encode

func (s *Traces) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Traces) GetMetrics

func (s *Traces) GetMetrics() OptSearchMetrics

GetMetrics returns the value of Metrics.

func (*Traces) GetTraces

func (s *Traces) GetTraces() []TraceSearchMetadata

GetTraces returns the value of Traces.

func (*Traces) MarshalJSON

func (s *Traces) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Traces) SetMetrics

func (s *Traces) SetMetrics(val OptSearchMetrics)

SetMetrics sets the value of Metrics.

func (*Traces) SetTraces

func (s *Traces) SetTraces(val []TraceSearchMetadata)

SetTraces sets the value of Traces.

func (*Traces) UnmarshalJSON

func (s *Traces) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Traces) Validate

func (s *Traces) Validate() error

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) BuildInfo

BuildInfo implements buildInfo operation.

Returns Tempo buildinfo, in the same format as Prometheus `/api/v1/status/buildinfo`. Used by Grafana to check Tempo API version.

GET /api/status/buildinfo

func (UnimplementedHandler) Echo

func (UnimplementedHandler) Echo(ctx context.Context) (r EchoOK, _ error)

Echo implements echo operation.

Echo request for testing, issued by Grafana.

GET /api/echo

func (UnimplementedHandler) NewError

func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (UnimplementedHandler) Query

Query implements query operation.

The instant version of the Metrics API is similar to the range version, but instead returns a single value for the query.

GET /api/metrics/query

func (UnimplementedHandler) QueryRange

func (UnimplementedHandler) QueryRange(ctx context.Context, params QueryRangeParams) (r *RangeMetrics, _ error)

QueryRange implements queryRange operation.

This endpoint returns Prometheus-like time-series for a given metrics query.

GET /api/metrics/query_range

func (UnimplementedHandler) Search

func (UnimplementedHandler) Search(ctx context.Context, params SearchParams) (r *Traces, _ error)

Search implements search operation.

Execute TraceQL query.

GET /api/search

func (UnimplementedHandler) SearchTagValues

func (UnimplementedHandler) SearchTagValues(ctx context.Context, params SearchTagValuesParams) (r *TagValues, _ error)

SearchTagValues implements searchTagValues operation.

This endpoint retrieves all discovered values for the given tag, which can be used in search.

GET /api/search/tag/{tag_name}/values

func (UnimplementedHandler) SearchTagValuesV2

func (UnimplementedHandler) SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (r *TagValuesV2, _ error)

SearchTagValuesV2 implements searchTagValuesV2 operation.

This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.

GET /api/v2/search/tag/{attribute_selector}/values

func (UnimplementedHandler) SearchTags

func (UnimplementedHandler) SearchTags(ctx context.Context, params SearchTagsParams) (r *TagNames, _ error)

SearchTags implements searchTags operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/search/tags

func (UnimplementedHandler) SearchTagsV2

func (UnimplementedHandler) SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (r *TagNamesV2, _ error)

SearchTagsV2 implements searchTagsV2 operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/v2/search/tags

func (UnimplementedHandler) TraceByID

func (UnimplementedHandler) TraceByID(ctx context.Context, params TraceByIDParams) (r TraceByIDRes, _ error)

TraceByID implements traceByID operation.

Querying traces by id.

GET /api/traces/{traceID}

func (UnimplementedHandler) TraceByIDv2

TraceByIDv2 implements traceByIDv2 operation.

Querying traces by id.

GET /api/v2/traces/{traceID}

Jump to

Keyboard shortcuts

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