Documentation ¶
Index ¶
- type Metric
- func (m Metric) Count() int32
- func (m Metric) CounterType() string
- func (m Metric) DisplayName() string
- func (m Metric) DisplayRateTimeScale() string
- func (m Metric) DisplayUnits() string
- func (m Metric) Increment() float64
- func (m Metric) IntervalSec() float32
- func (m Metric) Max() float64
- func (m Metric) Mean() float64
- func (m Metric) Min() float64
- func (m Metric) Name() string
- func (m Metric) Series() string
- func (m Metric) StandardDeviation() float64
- type MetricsConsumer
- type Parser
- type RequestWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶ added in v0.22.0
type Metric map[string]interface{}
Metric is a map containing all of the keys and values for a Metric extracted from the event parser. Most metrics will have some subset of the keys defined below, but some metrics/messages will have keys that deviate from this list.
func (Metric) CounterType ¶ added in v0.22.0
func (Metric) DisplayName ¶ added in v0.22.0
func (Metric) DisplayRateTimeScale ¶ added in v0.22.0
func (Metric) DisplayUnits ¶ added in v0.22.0
func (Metric) IntervalSec ¶ added in v0.22.0
func (Metric) StandardDeviation ¶ added in v0.22.0
type MetricsConsumer ¶ added in v0.23.0
type MetricsConsumer func([]Metric)
MetricsConsumer is a function that accepts a slice of Metrics. Parser has a member consumer function, used to send Metrics as they are created.
type Parser ¶ added in v0.22.0
type Parser struct {
// contains filtered or unexported fields
}
Parser encapsulates all of the functionality to parse an IPC stream.
func NewParser ¶ added in v0.22.0
func NewParser(rdr io.Reader, mc MetricsConsumer, bw network.BlobWriter, logger *zap.Logger) *Parser
NewParser accepts an io.Reader, a MetricsConsumer, and logger, and returns a Parser for processing an IPC stream.
func (*Parser) ParseAll ¶ added in v0.22.0
ParseAll parses all of the blocks until an error occurs or the context is cancelled.
func (*Parser) ParseIPC ¶ added in v0.22.0
ParseIPC parses the IPC response from the initial request to a dotnet process.
func (*Parser) ParseNettrace ¶ added in v0.22.0
ParseNettrace parses the nettrace magic message.
type RequestWriter ¶
type RequestWriter struct {
// contains filtered or unexported fields
}
RequestWriter submits the initial request to the dotnet diagnostics backend, after which it starts sending us metrics at the specified interval. ByteBuffer is swappable for testing. For docs on the protocol, see https://github.com/dotnet/diagnostics/blob/master/documentation/design-docs/ipc-protocol.md
func NewRequestWriter ¶
func NewRequestWriter(w io.Writer, intervalSec int, providerNames ...string) *RequestWriter
func (*RequestWriter) SendRequest ¶
func (w *RequestWriter) SendRequest() error