tracing

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tracing implements the Tracing domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Tracing domain with the connection set to conn.

Types

type BufferUsageClient

type BufferUsageClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*BufferUsageReply, error)
	rpcc.Stream
}

BufferUsageClient is a client for BufferUsage events.

type BufferUsageReply

type BufferUsageReply struct {
	PercentFull *float64 `json:"percentFull,omitempty"` // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
	EventCount  *float64 `json:"eventCount,omitempty"`  // An approximate number of events in the trace log.
	Value       *float64 `json:"value,omitempty"`       // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
}

BufferUsageReply is the reply for BufferUsage events.

type CompleteClient

type CompleteClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*CompleteReply, error)
	rpcc.Stream
}

CompleteClient is a client for TracingComplete events. Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.

type CompleteReply

type CompleteReply struct {
	Stream            *io.StreamHandle  `json:"stream,omitempty"`            // A handle of the stream that holds resulting trace data.
	TraceFormat       StreamFormat      `json:"traceFormat,omitempty"`       // Trace data format of returned stream.
	StreamCompression StreamCompression `json:"streamCompression,omitempty"` // Compression format of returned stream.
}

CompleteReply is the reply for TracingComplete events.

type DataCollectedClient

type DataCollectedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*DataCollectedReply, error)
	rpcc.Stream
}

DataCollectedClient is a client for DataCollected events. Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event.

type DataCollectedReply

type DataCollectedReply struct {
	Value []json.RawMessage `json:"value"` // No description.
}

DataCollectedReply is the reply for DataCollected events.

type GetCategoriesReply

type GetCategoriesReply struct {
	Categories []string `json:"categories"` // A list of supported tracing categories.
}

GetCategoriesReply represents the return values for GetCategories in the Tracing domain.

type MemoryDumpConfig

type MemoryDumpConfig []byte

MemoryDumpConfig Configuration for memory dump. Used only when "memory-infra" category is enabled.

func (MemoryDumpConfig) MarshalJSON

func (m MemoryDumpConfig) MarshalJSON() ([]byte, error)

MarshalJSON copies behavior of json.RawMessage.

func (*MemoryDumpConfig) UnmarshalJSON

func (m *MemoryDumpConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON copies behavior of json.RawMessage.

type RecordClockSyncMarkerArgs

type RecordClockSyncMarkerArgs struct {
	SyncID string `json:"syncId"` // The ID of this clock sync marker
}

RecordClockSyncMarkerArgs represents the arguments for RecordClockSyncMarker in the Tracing domain.

func NewRecordClockSyncMarkerArgs

func NewRecordClockSyncMarkerArgs(syncID string) *RecordClockSyncMarkerArgs

NewRecordClockSyncMarkerArgs initializes RecordClockSyncMarkerArgs with the required arguments.

type RequestMemoryDumpReply

type RequestMemoryDumpReply struct {
	DumpGUID string `json:"dumpGuid"` // GUID of the resulting global memory dump.
	Success  bool   `json:"success"`  // True iff the global memory dump succeeded.
}

RequestMemoryDumpReply represents the return values for RequestMemoryDump in the Tracing domain.

type StartArgs

type StartArgs struct {
	// Categories is deprecated.
	//
	// Deprecated: Category/tag filter
	Categories *string `json:"categories,omitempty"`
	// Options is deprecated.
	//
	// Deprecated: Tracing options
	Options                      *string  `json:"options,omitempty"`
	BufferUsageReportingInterval *float64 `json:"bufferUsageReportingInterval,omitempty"` // If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
	// TransferMode Whether to report trace events as series of
	// dataCollected events or to save trace to a stream (defaults to
	// `ReportEvents`).
	//
	// Values: "ReportEvents", "ReturnAsStream".
	TransferMode      *string           `json:"transferMode,omitempty"`
	StreamFormat      StreamFormat      `json:"streamFormat,omitempty"`      // Trace data format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `json`).
	StreamCompression StreamCompression `json:"streamCompression,omitempty"` // Compression format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `none`)
	TraceConfig       *TraceConfig      `json:"traceConfig,omitempty"`       // No description.
}

StartArgs represents the arguments for Start in the Tracing domain.

func NewStartArgs

func NewStartArgs() *StartArgs

NewStartArgs initializes StartArgs with the required arguments.

func (*StartArgs) SetBufferUsageReportingInterval

func (a *StartArgs) SetBufferUsageReportingInterval(bufferUsageReportingInterval float64) *StartArgs

SetBufferUsageReportingInterval sets the BufferUsageReportingInterval optional argument. If set, the agent will issue bufferUsage events at this interval, specified in milliseconds

func (*StartArgs) SetCategories deprecated

func (a *StartArgs) SetCategories(categories string) *StartArgs

SetCategories sets the Categories optional argument.

Deprecated: Category/tag filter

func (*StartArgs) SetOptions deprecated

func (a *StartArgs) SetOptions(options string) *StartArgs

SetOptions sets the Options optional argument.

Deprecated: Tracing options

func (*StartArgs) SetStreamCompression added in v0.15.3

func (a *StartArgs) SetStreamCompression(streamCompression StreamCompression) *StartArgs

SetStreamCompression sets the StreamCompression optional argument. Compression format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `none`)

func (*StartArgs) SetStreamFormat added in v0.23.1

func (a *StartArgs) SetStreamFormat(streamFormat StreamFormat) *StartArgs

SetStreamFormat sets the StreamFormat optional argument. Trace data format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `json`).

func (*StartArgs) SetTraceConfig

func (a *StartArgs) SetTraceConfig(traceConfig TraceConfig) *StartArgs

SetTraceConfig sets the TraceConfig optional argument.

func (*StartArgs) SetTransferMode

func (a *StartArgs) SetTransferMode(transferMode string) *StartArgs

SetTransferMode sets the TransferMode optional argument. Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to `ReportEvents`).

Values: "ReportEvents", "ReturnAsStream".

type StreamCompression added in v0.15.3

type StreamCompression string

StreamCompression Compression type to use for traces returned via streams.

const (
	StreamCompressionNotSet StreamCompression = ""
	StreamCompressionNone   StreamCompression = "none"
	StreamCompressionGzip   StreamCompression = "gzip"
)

StreamCompression as enums.

func (StreamCompression) String added in v0.15.3

func (e StreamCompression) String() string

func (StreamCompression) Valid added in v0.15.3

func (e StreamCompression) Valid() bool

type StreamFormat added in v0.23.1

type StreamFormat string

StreamFormat Data format of a trace. Can be either the legacy JSON format or the protocol buffer format. Note that the JSON format will be deprecated soon.

const (
	StreamFormatNotSet StreamFormat = ""
	StreamFormatJSON   StreamFormat = "json"
	StreamFormatProto  StreamFormat = "proto"
)

StreamFormat as enums.

func (StreamFormat) String added in v0.23.1

func (e StreamFormat) String() string

func (StreamFormat) Valid added in v0.23.1

func (e StreamFormat) Valid() bool

type TraceConfig

type TraceConfig struct {
	// RecordMode Controls how the trace buffer stores data.
	//
	// Values: "recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole".
	RecordMode           *string          `json:"recordMode,omitempty"`
	EnableSampling       *bool            `json:"enableSampling,omitempty"`       // Turns on JavaScript stack sampling.
	EnableSystrace       *bool            `json:"enableSystrace,omitempty"`       // Turns on system tracing.
	EnableArgumentFilter *bool            `json:"enableArgumentFilter,omitempty"` // Turns on argument filter.
	IncludedCategories   []string         `json:"includedCategories,omitempty"`   // Included category filters.
	ExcludedCategories   []string         `json:"excludedCategories,omitempty"`   // Excluded category filters.
	SyntheticDelays      []string         `json:"syntheticDelays,omitempty"`      // Configuration to synthesize the delays in tracing.
	MemoryDumpConfig     MemoryDumpConfig `json:"memoryDumpConfig,omitempty"`     // Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
}

TraceConfig

Jump to

Keyboard shortcuts

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