cloudtrace - ActiveState ActiveGo 1.8
...

Package cloudtrace

import "google.golang.org/genproto/googleapis/devtools/cloudtrace/v1"
Overview
Index

Overview ▾

Package cloudtrace is a generated protocol buffer package.

It is generated from these files:

google/devtools/cloudtrace/v1/trace.proto

It has these top-level messages:

Trace
Traces
TraceSpan
ListTracesRequest
ListTracesResponse
GetTraceRequest
PatchTracesRequest

Index ▾

Variables
func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer)
type GetTraceRequest
    func (*GetTraceRequest) Descriptor() ([]byte, []int)
    func (m *GetTraceRequest) GetProjectId() string
    func (m *GetTraceRequest) GetTraceId() string
    func (*GetTraceRequest) ProtoMessage()
    func (m *GetTraceRequest) Reset()
    func (m *GetTraceRequest) String() string
type ListTracesRequest
    func (*ListTracesRequest) Descriptor() ([]byte, []int)
    func (m *ListTracesRequest) GetEndTime() *google_protobuf2.Timestamp
    func (m *ListTracesRequest) GetFilter() string
    func (m *ListTracesRequest) GetOrderBy() string
    func (m *ListTracesRequest) GetPageSize() int32
    func (m *ListTracesRequest) GetPageToken() string
    func (m *ListTracesRequest) GetProjectId() string
    func (m *ListTracesRequest) GetStartTime() *google_protobuf2.Timestamp
    func (m *ListTracesRequest) GetView() ListTracesRequest_ViewType
    func (*ListTracesRequest) ProtoMessage()
    func (m *ListTracesRequest) Reset()
    func (m *ListTracesRequest) String() string
type ListTracesRequest_ViewType
    func (ListTracesRequest_ViewType) EnumDescriptor() ([]byte, []int)
    func (x ListTracesRequest_ViewType) String() string
type ListTracesResponse
    func (*ListTracesResponse) Descriptor() ([]byte, []int)
    func (m *ListTracesResponse) GetNextPageToken() string
    func (m *ListTracesResponse) GetTraces() []*Trace
    func (*ListTracesResponse) ProtoMessage()
    func (m *ListTracesResponse) Reset()
    func (m *ListTracesResponse) String() string
type PatchTracesRequest
    func (*PatchTracesRequest) Descriptor() ([]byte, []int)
    func (m *PatchTracesRequest) GetProjectId() string
    func (m *PatchTracesRequest) GetTraces() *Traces
    func (*PatchTracesRequest) ProtoMessage()
    func (m *PatchTracesRequest) Reset()
    func (m *PatchTracesRequest) String() string
type Trace
    func (*Trace) Descriptor() ([]byte, []int)
    func (m *Trace) GetProjectId() string
    func (m *Trace) GetSpans() []*TraceSpan
    func (m *Trace) GetTraceId() string
    func (*Trace) ProtoMessage()
    func (m *Trace) Reset()
    func (m *Trace) String() string
type TraceServiceClient
    func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient
type TraceServiceServer
type TraceSpan
    func (*TraceSpan) Descriptor() ([]byte, []int)
    func (m *TraceSpan) GetEndTime() *google_protobuf2.Timestamp
    func (m *TraceSpan) GetKind() TraceSpan_SpanKind
    func (m *TraceSpan) GetLabels() map[string]string
    func (m *TraceSpan) GetName() string
    func (m *TraceSpan) GetParentSpanId() uint64
    func (m *TraceSpan) GetSpanId() uint64
    func (m *TraceSpan) GetStartTime() *google_protobuf2.Timestamp
    func (*TraceSpan) ProtoMessage()
    func (m *TraceSpan) Reset()
    func (m *TraceSpan) String() string
type TraceSpan_SpanKind
    func (TraceSpan_SpanKind) EnumDescriptor() ([]byte, []int)
    func (x TraceSpan_SpanKind) String() string
type Traces
    func (*Traces) Descriptor() ([]byte, []int)
    func (m *Traces) GetTraces() []*Trace
    func (*Traces) ProtoMessage()
    func (m *Traces) Reset()
    func (m *Traces) String() string

Package files

trace.pb.go

Variables

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

func RegisterTraceServiceServer

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

type GetTraceRequest

The request message for the `GetTrace` method.

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" json:"project_id,omitempty"`
    // ID of the trace to return.
    TraceId string `protobuf:"bytes,2,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"`
}

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

type ListTracesRequest

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

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" 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,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" 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" json:"page_token,omitempty"`
    // End of the time interval (inclusive) during which the trace data was
    // collected from the application.
    StartTime *google_protobuf2.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
    // Start of the time interval (inclusive) during which the trace data was
    // collected from the application.
    EndTime *google_protobuf2.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
    // An optional filter for the request.
    Filter string `protobuf:"bytes,7,opt,name=filter" 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" json:"order_by,omitempty"`
}

func (*ListTracesRequest) Descriptor

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

func (*ListTracesRequest) GetEndTime

func (m *ListTracesRequest) GetEndTime() *google_protobuf2.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() *google_protobuf2.Timestamp

func (*ListTracesRequest) GetView

func (m *ListTracesRequest) GetView() ListTracesRequest_ViewType

func (*ListTracesRequest) ProtoMessage

func (*ListTracesRequest) ProtoMessage()

func (*ListTracesRequest) Reset

func (m *ListTracesRequest) Reset()

func (*ListTracesRequest) String

func (m *ListTracesRequest) String() string

type ListTracesRequest_ViewType

Type of data returned for traces in the list.

type ListTracesRequest_ViewType int32
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

func (x ListTracesRequest_ViewType) String() string

type ListTracesResponse

The response message for the `ListTraces` method.

type ListTracesResponse struct {
    // List of trace records returned.
    Traces []*Trace `protobuf:"bytes,1,rep,name=traces" 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" json:"next_page_token,omitempty"`
}

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

type PatchTracesRequest

The request message for the `PatchTraces` method.

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" json:"project_id,omitempty"`
    // The body of the message.
    Traces *Traces `protobuf:"bytes,2,opt,name=traces" json:"traces,omitempty"`
}

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

type Trace

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.

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" 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" json:"trace_id,omitempty"`
    // Collection of spans in the trace.
    Spans []*TraceSpan `protobuf:"bytes,3,rep,name=spans" json:"spans,omitempty"`
}

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

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) (*google_protobuf1.Empty, error)
}

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) (*google_protobuf1.Empty, error)
}

type TraceSpan

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.

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" 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,enum=google.devtools.cloudtrace.v1.TraceSpan_SpanKind" json:"kind,omitempty"`
    // Name of the trace. The trace name is sanitized and displayed in the
    // Stackdriver Trace tool in the Google Developers Console.
    // 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" json:"name,omitempty"`
    // Start time of the span in nanoseconds from the UNIX epoch.
    StartTime *google_protobuf2.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
    // End time of the span in nanoseconds from the UNIX epoch.
    EndTime *google_protobuf2.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
    // ID of the parent span, if any. Optional.
    ParentSpanId uint64 `protobuf:"fixed64,6,opt,name=parent_span_id,json=parentSpanId" json:"parent_span_id,omitempty"`
    // Collection of labels associated with the span.
    Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}

func (*TraceSpan) Descriptor

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

func (*TraceSpan) GetEndTime

func (m *TraceSpan) GetEndTime() *google_protobuf2.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() *google_protobuf2.Timestamp

func (*TraceSpan) ProtoMessage

func (*TraceSpan) ProtoMessage()

func (*TraceSpan) Reset

func (m *TraceSpan) Reset()

func (*TraceSpan) String

func (m *TraceSpan) String() string

type TraceSpan_SpanKind

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

type TraceSpan_SpanKind int32
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

List of new or updated traces.

type Traces struct {
    // List of traces.
    Traces []*Trace `protobuf:"bytes,1,rep,name=traces" json:"traces,omitempty"`
}

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