cloudtrace

package
v0.0.0-...-2a72893 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListTracesRequest_ViewType_name = map[int32]string{
	0: "VIEW_TYPE_UNSPECIFIED",
	1: "MINIMAL",
	2: "ROOTSPAN",
	3: "COMPLETE",
}
View Source
var ListTracesRequest_ViewType_value = map[string]int32{
	"VIEW_TYPE_UNSPECIFIED": 0,
	"MINIMAL":               1,
	"ROOTSPAN":              2,
	"COMPLETE":              3,
}
View Source
var TraceSpan_SpanKind_name = map[int32]string{
	0: "SPAN_KIND_UNSPECIFIED",
	1: "RPC_SERVER",
	2: "RPC_CLIENT",
}
View Source
var TraceSpan_SpanKind_value = map[string]int32{
	"SPAN_KIND_UNSPECIFIED": 0,
	"RPC_SERVER":            1,
	"RPC_CLIENT":            2,
}

Functions

func RegisterTraceServiceServer

func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer)

Types

type GetTraceRequest

type GetTraceRequest struct {
	// ID of the Cloud project where the trace data is stored.
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// ID of the trace to return.
	TraceId              string   `protobuf:"bytes,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message for the `GetTrace` method.

func (*GetTraceRequest) Descriptor

func (*GetTraceRequest) Descriptor() ([]byte, []int)

func (*GetTraceRequest) GetProjectId

func (m *GetTraceRequest) GetProjectId() string

func (*GetTraceRequest) GetTraceId

func (m *GetTraceRequest) GetTraceId() string

func (*GetTraceRequest) ProtoMessage

func (*GetTraceRequest) ProtoMessage()

func (*GetTraceRequest) Reset

func (m *GetTraceRequest) Reset()

func (*GetTraceRequest) String

func (m *GetTraceRequest) String() string

func (*GetTraceRequest) XXX_DiscardUnknown

func (m *GetTraceRequest) XXX_DiscardUnknown()

func (*GetTraceRequest) XXX_Marshal

func (m *GetTraceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetTraceRequest) XXX_Merge

func (dst *GetTraceRequest) XXX_Merge(src proto.Message)

func (*GetTraceRequest) XXX_Size

func (m *GetTraceRequest) XXX_Size() int

func (*GetTraceRequest) XXX_Unmarshal

func (m *GetTraceRequest) XXX_Unmarshal(b []byte) error

type ListTracesRequest

type ListTracesRequest struct {
	// ID of the Cloud project where the trace data is stored.
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// Type of data returned for traces in the list. Optional. Default is
	// `MINIMAL`.
	View ListTracesRequest_ViewType `protobuf:"varint,2,opt,name=view,proto3,enum=google.devtools.cloudtrace.v1.ListTracesRequest_ViewType" json:"view,omitempty"`
	// Maximum number of traces to return. If not specified or <= 0, the
	// implementation selects a reasonable value.  The implementation may
	// return fewer traces than the requested page size. Optional.
	PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Token identifying the page of results to return. If provided, use the
	// value of the `next_page_token` field from a previous request. Optional.
	PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// Start of the time interval (inclusive) during which the trace data was
	// collected from the application.
	StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// End of the time interval (inclusive) during which the trace data was
	// collected from the application.
	EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// An optional filter against labels for the request.
	//
	// By default, searches use prefix matching. To specify exact match, prepend
	// a plus symbol (`+`) to the search term.
	// Multiple terms are ANDed. Syntax:
	//
	// *   `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
	//     span starts with `NAME_PREFIX`.
	// *   `+root:NAME` or `+NAME`: Return traces where any root span's name is
	//     exactly `NAME`.
	// *   `span:NAME_PREFIX`: Return traces where any span starts with
	//     `NAME_PREFIX`.
	// *   `+span:NAME`: Return traces where any span's name is exactly
	//     `NAME`.
	// *   `latency:DURATION`: Return traces whose overall latency is
	//     greater or equal to than `DURATION`. Accepted units are nanoseconds
	//     (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
	//     example, `latency:24ms` returns traces whose overall latency
	//     is greater than or equal to 24 milliseconds.
	// *   `label:LABEL_KEY`: Return all traces containing the specified
	//     label key (exact match, case-sensitive) regardless of the key:value
	//     pair's value (including empty values).
	// *   `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
	//     label key (exact match, case-sensitive) whose value starts with
	//     `VALUE_PREFIX`. Both a key and a value must be specified.
	// *   `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
	//     exactly matching the specified text. Both a key and a value must be
	//     specified.
	// *   `method:VALUE`: Equivalent to `/http/method:VALUE`.
	// *   `url:VALUE`: Equivalent to `/http/url:VALUE`.
	Filter string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
	// Field used to sort the returned traces. Optional.
	// Can be one of the following:
	//
	// *   `trace_id`
	// *   `name` (`name` field of root span in the trace)
	// *   `duration` (difference between `end_time` and `start_time` fields of
	//      the root span)
	// *   `start` (`start_time` field of the root span)
	//
	// Descending order can be specified by appending `desc` to the sort field
	// (for example, `name desc`).
	//
	// Only one sort field is permitted.
	OrderBy              string   `protobuf:"bytes,8,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message for the `ListTraces` method. All fields are required unless specified.

func (*ListTracesRequest) Descriptor

func (*ListTracesRequest) Descriptor() ([]byte, []int)

func (*ListTracesRequest) GetEndTime

func (m *ListTracesRequest) GetEndTime() *timestamp.Timestamp

func (*ListTracesRequest) GetFilter

func (m *ListTracesRequest) GetFilter() string

func (*ListTracesRequest) GetOrderBy

func (m *ListTracesRequest) GetOrderBy() string

func (*ListTracesRequest) GetPageSize

func (m *ListTracesRequest) GetPageSize() int32

func (*ListTracesRequest) GetPageToken

func (m *ListTracesRequest) GetPageToken() string

func (*ListTracesRequest) GetProjectId

func (m *ListTracesRequest) GetProjectId() string

func (*ListTracesRequest) GetStartTime

func (m *ListTracesRequest) GetStartTime() *timestamp.Timestamp

func (*ListTracesRequest) GetView

func (*ListTracesRequest) ProtoMessage

func (*ListTracesRequest) ProtoMessage()

func (*ListTracesRequest) Reset

func (m *ListTracesRequest) Reset()

func (*ListTracesRequest) String

func (m *ListTracesRequest) String() string

func (*ListTracesRequest) XXX_DiscardUnknown

func (m *ListTracesRequest) XXX_DiscardUnknown()

func (*ListTracesRequest) XXX_Marshal

func (m *ListTracesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListTracesRequest) XXX_Merge

func (dst *ListTracesRequest) XXX_Merge(src proto.Message)

func (*ListTracesRequest) XXX_Size

func (m *ListTracesRequest) XXX_Size() int

func (*ListTracesRequest) XXX_Unmarshal

func (m *ListTracesRequest) XXX_Unmarshal(b []byte) error

type ListTracesRequest_ViewType

type ListTracesRequest_ViewType int32

Type of data returned for traces in the list.

const (
	// Default is `MINIMAL` if unspecified.
	ListTracesRequest_VIEW_TYPE_UNSPECIFIED ListTracesRequest_ViewType = 0
	// Minimal view of the trace record that contains only the project
	// and trace IDs.
	ListTracesRequest_MINIMAL ListTracesRequest_ViewType = 1
	// Root span view of the trace record that returns the root spans along
	// with the minimal trace data.
	ListTracesRequest_ROOTSPAN ListTracesRequest_ViewType = 2
	// Complete view of the trace record that contains the actual trace data.
	// This is equivalent to calling the REST `get` or RPC `GetTrace` method
	// using the ID of each listed trace.
	ListTracesRequest_COMPLETE ListTracesRequest_ViewType = 3
)

func (ListTracesRequest_ViewType) EnumDescriptor

func (ListTracesRequest_ViewType) EnumDescriptor() ([]byte, []int)

func (ListTracesRequest_ViewType) String

type ListTracesResponse

type ListTracesResponse struct {
	// List of trace records returned.
	Traces []*Trace `protobuf:"bytes,1,rep,name=traces,proto3" json:"traces,omitempty"`
	// If defined, indicates that there are more traces that match the request
	// and that this value should be passed to the next request to continue
	// retrieving additional traces.
	NextPageToken        string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response message for the `ListTraces` method.

func (*ListTracesResponse) Descriptor

func (*ListTracesResponse) Descriptor() ([]byte, []int)

func (*ListTracesResponse) GetNextPageToken

func (m *ListTracesResponse) GetNextPageToken() string

func (*ListTracesResponse) GetTraces

func (m *ListTracesResponse) GetTraces() []*Trace

func (*ListTracesResponse) ProtoMessage

func (*ListTracesResponse) ProtoMessage()

func (*ListTracesResponse) Reset

func (m *ListTracesResponse) Reset()

func (*ListTracesResponse) String

func (m *ListTracesResponse) String() string

func (*ListTracesResponse) XXX_DiscardUnknown

func (m *ListTracesResponse) XXX_DiscardUnknown()

func (*ListTracesResponse) XXX_Marshal

func (m *ListTracesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListTracesResponse) XXX_Merge

func (dst *ListTracesResponse) XXX_Merge(src proto.Message)

func (*ListTracesResponse) XXX_Size

func (m *ListTracesResponse) XXX_Size() int

func (*ListTracesResponse) XXX_Unmarshal

func (m *ListTracesResponse) XXX_Unmarshal(b []byte) error

type PatchTracesRequest

type PatchTracesRequest struct {
	// ID of the Cloud project where the trace data is stored.
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// The body of the message.
	Traces               *Traces  `protobuf:"bytes,2,opt,name=traces,proto3" json:"traces,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message for the `PatchTraces` method.

func (*PatchTracesRequest) Descriptor

func (*PatchTracesRequest) Descriptor() ([]byte, []int)

func (*PatchTracesRequest) GetProjectId

func (m *PatchTracesRequest) GetProjectId() string

func (*PatchTracesRequest) GetTraces

func (m *PatchTracesRequest) GetTraces() *Traces

func (*PatchTracesRequest) ProtoMessage

func (*PatchTracesRequest) ProtoMessage()

func (*PatchTracesRequest) Reset

func (m *PatchTracesRequest) Reset()

func (*PatchTracesRequest) String

func (m *PatchTracesRequest) String() string

func (*PatchTracesRequest) XXX_DiscardUnknown

func (m *PatchTracesRequest) XXX_DiscardUnknown()

func (*PatchTracesRequest) XXX_Marshal

func (m *PatchTracesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PatchTracesRequest) XXX_Merge

func (dst *PatchTracesRequest) XXX_Merge(src proto.Message)

func (*PatchTracesRequest) XXX_Size

func (m *PatchTracesRequest) XXX_Size() int

func (*PatchTracesRequest) XXX_Unmarshal

func (m *PatchTracesRequest) XXX_Unmarshal(b []byte) error

type Trace

type Trace struct {
	// Project ID of the Cloud project where the trace data is stored.
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// Globally unique identifier for the trace. This identifier is a 128-bit
	// numeric value formatted as a 32-byte hex string.
	TraceId string `protobuf:"bytes,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	// Collection of spans in the trace.
	Spans                []*TraceSpan `protobuf:"bytes,3,rep,name=spans,proto3" json:"spans,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

A trace describes how long it takes for an application to perform an operation. It consists of a set of spans, each of which represent a single timed event within the operation.

func (*Trace) Descriptor

func (*Trace) Descriptor() ([]byte, []int)

func (*Trace) GetProjectId

func (m *Trace) GetProjectId() string

func (*Trace) GetSpans

func (m *Trace) GetSpans() []*TraceSpan

func (*Trace) GetTraceId

func (m *Trace) GetTraceId() string

func (*Trace) ProtoMessage

func (*Trace) ProtoMessage()

func (*Trace) Reset

func (m *Trace) Reset()

func (*Trace) String

func (m *Trace) String() string

func (*Trace) XXX_DiscardUnknown

func (m *Trace) XXX_DiscardUnknown()

func (*Trace) XXX_Marshal

func (m *Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Trace) XXX_Merge

func (dst *Trace) XXX_Merge(src proto.Message)

func (*Trace) XXX_Size

func (m *Trace) XXX_Size() int

func (*Trace) XXX_Unmarshal

func (m *Trace) XXX_Unmarshal(b []byte) error

type TraceServiceClient

type TraceServiceClient interface {
	// Returns of a list of traces that match the specified filter conditions.
	ListTraces(ctx context.Context, in *ListTracesRequest, opts ...grpc.CallOption) (*ListTracesResponse, error)
	// Gets a single trace by its ID.
	GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (*Trace, error)
	// Sends new traces to Stackdriver Trace or updates existing traces. If the ID
	// of a trace that you send matches that of an existing trace, any fields
	// in the existing trace and its spans are overwritten by the provided values,
	// and any new fields provided are merged with the existing trace data. If the
	// ID does not match, a new trace is created.
	PatchTraces(ctx context.Context, in *PatchTracesRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

TraceServiceClient is the client API for TraceService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTraceServiceClient

func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient

type TraceServiceServer

type TraceServiceServer interface {
	// Returns of a list of traces that match the specified filter conditions.
	ListTraces(context.Context, *ListTracesRequest) (*ListTracesResponse, error)
	// Gets a single trace by its ID.
	GetTrace(context.Context, *GetTraceRequest) (*Trace, error)
	// Sends new traces to Stackdriver Trace or updates existing traces. If the ID
	// of a trace that you send matches that of an existing trace, any fields
	// in the existing trace and its spans are overwritten by the provided values,
	// and any new fields provided are merged with the existing trace data. If the
	// ID does not match, a new trace is created.
	PatchTraces(context.Context, *PatchTracesRequest) (*empty.Empty, error)
}

TraceServiceServer is the server API for TraceService service.

type TraceSpan

type TraceSpan struct {
	// Identifier for the span. Must be a 64-bit integer other than 0 and
	// unique within a trace.
	SpanId uint64 `protobuf:"fixed64,1,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	// Distinguishes between spans generated in a particular context. For example,
	// two spans with the same name may be distinguished using `RPC_CLIENT`
	// and `RPC_SERVER` to identify queueing latency associated with the span.
	Kind TraceSpan_SpanKind `protobuf:"varint,2,opt,name=kind,proto3,enum=google.devtools.cloudtrace.v1.TraceSpan_SpanKind" json:"kind,omitempty"`
	// Name of the span. Must be less than 128 bytes. The span name is sanitized
	// and displayed in the Stackdriver Trace tool in the
	// {% dynamic print site_values.console_name %}.
	// The name may be a method name or some other per-call site name.
	// For the same executable and the same call point, a best practice is
	// to use a consistent name, which makes it easier to correlate
	// cross-trace spans.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Start time of the span in nanoseconds from the UNIX epoch.
	StartTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// End time of the span in nanoseconds from the UNIX epoch.
	EndTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// ID of the parent span, if any. Optional.
	ParentSpanId uint64 `protobuf:"fixed64,6,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
	// Collection of labels associated with the span. Label keys must be less than
	// 128 bytes. Label values must be less than 16 kilobytes (10MB for
	// `/stacktrace` values).
	//
	// Some predefined label keys exist, or you may create your own. When creating
	// your own, we recommend the following formats:
	//
	// * `/category/product/key` for agents of well-known products (e.g.
	//   `/db/mongodb/read_size`).
	// * `short_host/path/key` for domain-specific keys (e.g.
	//   `foo.com/myproduct/bar`)
	//
	// Predefined labels include:
	//
	// *   `/agent`
	// *   `/component`
	// *   `/error/message`
	// *   `/error/name`
	// *   `/http/client_city`
	// *   `/http/client_country`
	// *   `/http/client_protocol`
	// *   `/http/client_region`
	// *   `/http/host`
	// *   `/http/method`
	// *   `/http/path`
	// *   `/http/redirected_url`
	// *   `/http/request/size`
	// *   `/http/response/size`
	// *   `/http/route`
	// *   `/http/status_code`
	// *   `/http/url`
	// *   `/http/user_agent`
	// *   `/pid`
	// *   `/stacktrace`
	// *   `/tid`
	Labels               map[string]string `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

A span represents a single timed event within a trace. Spans can be nested and form a trace tree. Often, a trace contains a root span that describes the end-to-end latency of an operation and, optionally, one or more subspans for its suboperations. Spans do not need to be contiguous. There may be gaps between spans in a trace.

func (*TraceSpan) Descriptor

func (*TraceSpan) Descriptor() ([]byte, []int)

func (*TraceSpan) GetEndTime

func (m *TraceSpan) GetEndTime() *timestamp.Timestamp

func (*TraceSpan) GetKind

func (m *TraceSpan) GetKind() TraceSpan_SpanKind

func (*TraceSpan) GetLabels

func (m *TraceSpan) GetLabels() map[string]string

func (*TraceSpan) GetName

func (m *TraceSpan) GetName() string

func (*TraceSpan) GetParentSpanId

func (m *TraceSpan) GetParentSpanId() uint64

func (*TraceSpan) GetSpanId

func (m *TraceSpan) GetSpanId() uint64

func (*TraceSpan) GetStartTime

func (m *TraceSpan) GetStartTime() *timestamp.Timestamp

func (*TraceSpan) ProtoMessage

func (*TraceSpan) ProtoMessage()

func (*TraceSpan) Reset

func (m *TraceSpan) Reset()

func (*TraceSpan) String

func (m *TraceSpan) String() string

func (*TraceSpan) XXX_DiscardUnknown

func (m *TraceSpan) XXX_DiscardUnknown()

func (*TraceSpan) XXX_Marshal

func (m *TraceSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceSpan) XXX_Merge

func (dst *TraceSpan) XXX_Merge(src proto.Message)

func (*TraceSpan) XXX_Size

func (m *TraceSpan) XXX_Size() int

func (*TraceSpan) XXX_Unmarshal

func (m *TraceSpan) XXX_Unmarshal(b []byte) error

type TraceSpan_SpanKind

type TraceSpan_SpanKind int32

Type of span. Can be used to specify additional relationships between spans in addition to a parent/child relationship.

const (
	// Unspecified.
	TraceSpan_SPAN_KIND_UNSPECIFIED TraceSpan_SpanKind = 0
	// Indicates that the span covers server-side handling of an RPC or other
	// remote network request.
	TraceSpan_RPC_SERVER TraceSpan_SpanKind = 1
	// Indicates that the span covers the client-side wrapper around an RPC or
	// other remote request.
	TraceSpan_RPC_CLIENT TraceSpan_SpanKind = 2
)

func (TraceSpan_SpanKind) EnumDescriptor

func (TraceSpan_SpanKind) EnumDescriptor() ([]byte, []int)

func (TraceSpan_SpanKind) String

func (x TraceSpan_SpanKind) String() string

type Traces

type Traces struct {
	// List of traces.
	Traces               []*Trace `protobuf:"bytes,1,rep,name=traces,proto3" json:"traces,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

List of new or updated traces.

func (*Traces) Descriptor

func (*Traces) Descriptor() ([]byte, []int)

func (*Traces) GetTraces

func (m *Traces) GetTraces() []*Trace

func (*Traces) ProtoMessage

func (*Traces) ProtoMessage()

func (*Traces) Reset

func (m *Traces) Reset()

func (*Traces) String

func (m *Traces) String() string

func (*Traces) XXX_DiscardUnknown

func (m *Traces) XXX_DiscardUnknown()

func (*Traces) XXX_Marshal

func (m *Traces) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Traces) XXX_Merge

func (dst *Traces) XXX_Merge(src proto.Message)

func (*Traces) XXX_Size

func (m *Traces) XXX_Size() int

func (*Traces) XXX_Unmarshal

func (m *Traces) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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