dogapi

package
v0.0.0-...-5e858b1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TracesFromInputSpanLists

func TracesFromInputSpanLists(input dogproto.SpanLists) (map[TraceID]Trace, error)

Types

type FloatTime

type FloatTime time.Time

func (FloatTime) MarshalJSON

func (ft FloatTime) MarshalJSON() ([]byte, error)

func (*FloatTime) UnmarshalJSON

func (ft *FloatTime) UnmarshalJSON(bts []byte) error

type Span

type Span struct {
	TraceID         TraceID            `json:"trace_id"`
	SpanID          SpanID             `json:"span_id"`
	ParentID        SpanID             `json:"parent_id"`
	Start           FloatTime          `json:"start"`
	End             FloatTime          `json:"end"`
	Duration        time.Duration      `json:"duration"`
	Type            string             `json:"type"`
	Service         string             `json:"service"`
	Name            string             `json:"name"`
	Resource        string             `json:"resource"`
	ResourceHash    string             `json:"resource_hash"`
	HostID          int64              `json:"host_id"`
	HostName        string             `json:"hostname"`
	Env             string             `json:"env"`
	HostGroups      []string           `json:"host_groups"`
	Meta            map[string]string  `json:"meta"`
	Metrics         map[string]float64 `json:"metrics"`
	IngestionReason string             `json:"ingestion_reason"`
	Metadata        any                `json:"metadata"` // Unsure how to type this
	ChildIDs        []SpanID           `json:"children_ids"`
}

func SpanFromInputTrace

func SpanFromInputTrace(input dogproto.Span) (Span, error)

type SpanID

type SpanID string

type Trace

type Trace struct {
	RootID SpanID          `json:"root_id"`
	Spans  map[SpanID]Span `json:"spans"`
}

Trace describes the response format for the datadog REST API: https://app.datadoghq.com/api/v1/trace/<id>

It's _just_ different enough, and with a different-enough purpose, to dogproto to merit duplication.

type TraceID

type TraceID string

Jump to

Keyboard shortcuts

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