Documentation ¶
Index ¶
Constants ¶
const ( CommandSetDump CommandSetEventPipe CommandSetProfiler CommandSetProcess CommandSetServer = 0xFF )
const ( EventPipeStopTracing EventPipeCollectTracing EventPipeCollectTracing2 )
Variables ¶
Functions ¶
func DefaultServerAddress ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implement Diagnostic IPC Protocol client. https://github.com/dotnet/diagnostics/blob/main/documentation/design-docs/ipc-protocol.md#CollectStreaming
func NewClient ¶
NewClient creates a new Diagnostic IPC Protocol client for the transport specified - on Unix/Linux based platforms, a Unix Domain Socket will be used, and on Windows, a Named Pipe will be used:
- /tmp/dotnet-diagnostic-{%d:PID}-{%llu:disambiguation key}-socket (Linux/MacOS)
- \\.\pipe\dotnet-diagnostic-{%d:PID} (Windows)
Refer to documentation for details: https://github.com/dotnet/diagnostics/blob/main/documentation/design-docs/ipc-protocol.md#transport
func (*Client) CollectTracing ¶
func (c *Client) CollectTracing(config CollectTracingConfig) (s *Session, err error)
CollectTracing creates a new EventPipe session stream of NetTrace data.
func (*Client) StopTracing ¶
StopTracing stops the given streaming session started with CollectTracing.
type CollectTracingConfig ¶
type CollectTracingConfig struct { // CircularBufferSizeMB specifies the size of the circular buffer used for // buffering event data while streaming CircularBufferSizeMB uint32 // Providers member lists providers to turn on for a streaming session. // See ETW documentation for a more detailed explanation of Keywords, Filters, and Log Level: // https://docs.microsoft.com/en-us/message-analyzer/system-etw-provider-event-keyword-level-settings Providers []ProviderConfig }
CollectTracingConfig contains supported parameters for CollectTracing command.
type CollectTracingPayload ¶
type CollectTracingPayload struct { CircularBufferSizeMB uint32 Format Format Providers []ProviderConfig }
func (CollectTracingPayload) Bytes ¶
func (p CollectTracingPayload) Bytes() []byte
type CollectTracingResponse ¶
type CollectTracingResponse struct {
SessionID uint64
}
type ErrorResponse ¶
type ErrorResponse struct {
Code uint32
}
type ProviderConfig ¶
type Session ¶
type Session struct { ID uint64 // contains filtered or unexported fields }
Session represents EventPipe stream of NetTrace data created with `CollectTracing` command.
A session is expected to be closed with `StopTracing` call (or `Close`), as there is a "run down" at the end of a stream session that transmits additional metadata. If the stream is stopped prematurely due to a client or server error, the NetTrace stream will be incomplete and should be considered corrupted.
type StopTracingPayload ¶
type StopTracingPayload struct {
SessionID uint64
}
func (StopTracingPayload) Bytes ¶
func (p StopTracingPayload) Bytes() []byte
type StopTracingResponse ¶
type StopTracingResponse struct {
SessionID uint64
}