Documentation ¶
Index ¶
- Constants
- type DDMetric
- type DatadogMetricSink
- func (dd *DatadogMetricSink) Flush(ctx context.Context, interMetrics []samplers.InterMetric) error
- func (dd *DatadogMetricSink) FlushEventsChecks(ctx context.Context, events []samplers.UDPEvent, ...)
- func (dd *DatadogMetricSink) Name() string
- func (dd *DatadogMetricSink) Start(cl *trace.Client) error
- type DatadogSpanSink
- type DatadogTraceSpan
Constants ¶
const DatadogResourceKey = "resource"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DDMetric ¶
type DDMetric struct { Name string `json:"metric"` Value [1][2]float64 `json:"points"` Tags []string `json:"tags,omitempty"` MetricType string `json:"type"` Hostname string `json:"host,omitempty"` DeviceName string `json:"device_name,omitempty"` Interval int32 `json:"interval,omitempty"` }
DDMetric is a data structure that represents the JSON that Datadog wants when posting to the API
type DatadogMetricSink ¶
type DatadogMetricSink struct { HTTPClient *http.Client APIKey string DDHostname string // contains filtered or unexported fields }
func NewDatadogMetricSink ¶
func NewDatadogMetricSink(interval float64, flushMaxPerBody int, hostname string, tags []string, ddHostname string, apiKey string, httpClient *http.Client, stats *statsd.Client, log *logrus.Logger) (*DatadogMetricSink, error)
NewDatadogMetricSink creates a new Datadog sink for trace spans.
func (*DatadogMetricSink) Flush ¶
func (dd *DatadogMetricSink) Flush(ctx context.Context, interMetrics []samplers.InterMetric) error
func (*DatadogMetricSink) FlushEventsChecks ¶
func (dd *DatadogMetricSink) FlushEventsChecks(ctx context.Context, events []samplers.UDPEvent, checks []samplers.UDPServiceCheck)
func (*DatadogMetricSink) Name ¶
func (dd *DatadogMetricSink) Name() string
Name returns the name of this sink.
type DatadogSpanSink ¶
DatadogSpanSink is a sink for sending spans to a Datadog trace agent.
func NewDatadogSpanSink ¶
func NewDatadogSpanSink(address string, bufferSize int, stats *statsd.Client, httpClient *http.Client, commonTags map[string]string, log *logrus.Logger) (*DatadogSpanSink, error)
NewDatadogSpanSink creates a new Datadog sink for trace spans.
func (*DatadogSpanSink) Flush ¶
func (dd *DatadogSpanSink) Flush()
Flush signals the sink to send it's spans to their destination. For this sync it means we'll be making an HTTP request to send them along. We assume it's beneficial to performance to defer these until the normal 10s flush.
func (*DatadogSpanSink) Ingest ¶
func (dd *DatadogSpanSink) Ingest(span *ssf.SSFSpan) error
Ingest takes the span and adds it to the ringbuffer.
func (*DatadogSpanSink) Name ¶
func (dd *DatadogSpanSink) Name() string
Name returns the name of this sink.
type DatadogTraceSpan ¶
type DatadogTraceSpan struct { Duration int64 `json:"duration"` Error int64 `json:"error"` Meta map[string]string `json:"meta"` Metrics map[string]float64 `json:"metrics"` Name string `json:"name"` ParentID int64 `json:"parent_id,omitempty"` Resource string `json:"resource,omitempty"` Service string `json:"service"` SpanID int64 `json:"span_id"` Start int64 `json:"start"` TraceID int64 `json:"trace_id"` Type string `json:"type"` }
DatadogTraceSpan represents a trace span as JSON for the Datadog tracing API.