goldendataset

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TracesColumnResource               = 0
	TracesColumnInstrumentationLibrary = 1
	TracesColumnSpans                  = 2
)

Input columns in pict_input_traces.txt

View Source
const (
	SpansColumnParent     = 0
	SpansColumnTracestate = 1
	SpansColumnKind       = 2
	SpansColumnAttributes = 3
	SpansColumnEvents     = 4
	SpansColumnLinks      = 5
	SpansColumnStatus     = 6
)

Input columns in pict_input_spans.txt

Variables

This section is empty.

Functions

func GenerateMetrics added in v0.28.0

func GenerateMetrics(metricPairsFile string) ([]pdata.Metrics, error)

GenerateMetrics takes the filename of a PICT-generated file, walks through all of the rows in the PICT file and for each row, generates a MetricData object, collecting them and returning them to the caller.

func GenerateResource

func GenerateResource(rscID PICTInputResource) pdata.Resource

GenerateResource generates a PData Resource object with representative attributes for the underlying resource type specified by the rscID input parameter.

func GenerateTraces added in v0.22.0

func GenerateTraces(tracePairsFile string, spanPairsFile string) ([]pdata.Traces, error)

GenerateTraces generates a slice of OTLP ResourceSpans objects based on the PICT-generated pairwise parameters defined in the parameters file specified by the tracePairsFile parameter. The pairs to generate spans for for defined in the file specified by the spanPairsFile parameter. The slice of ResourceSpans are returned. If an err is returned, the slice elements will be nil.

func MetricsFromCfg added in v0.22.0

func MetricsFromCfg(cfg MetricsCfg) pdata.Metrics

MetricsFromCfg produces pdata.Metrics with the passed-in config.

Types

type MetricsCfg added in v0.28.0

type MetricsCfg struct {
	// The type of metric to generate
	MetricDescriptorType pdata.MetricDataType
	// MetricValueType is the type of the numeric value: int or double.
	MetricValueType pdata.MetricValueType
	// If MetricDescriptorType is one of the Sum, this describes if the sum is monotonic or not.
	IsMonotonicSum bool
	// A prefix for every metric name
	MetricNamePrefix string
	// The number of instrumentation library metrics per resource
	NumILMPerResource int
	// The size of the MetricSlice and number of Metrics
	NumMetricsPerILM int
	// The number of labels on the LabelsMap associated with each point
	NumPtLabels int
	// The number of points to generate per Metric
	NumPtsPerMetric int
	// The number of Attributes to insert into each Resource's AttributesMap
	NumResourceAttrs int
	// The number of ResourceMetrics for the single MetricData generated
	NumResourceMetrics int
	// The base value for each point
	PtVal int
	// The start time for each point
	StartTime uint64
	// The duration of the steps between each generated point starting at StartTime
	StepSize uint64
}

MetricsCfg holds parameters for generating dummy metrics for testing. Set values on this struct to generate metrics with the corresponding number/type of attributes and pass into MetricsFromCfg to generate metrics.

func DefaultCfg added in v0.7.0

func DefaultCfg() MetricsCfg

DefaultCfg produces a MetricsCfg with default values. These should be good enough to produce sane (but boring) metrics, and can be used as a starting point for making alterations.

type PICTInputAttributes

type PICTInputAttributes string

PICTInputAttributes enum for the categories of representative attributes a generated span can be populated with.

const (
	SpanAttrEmpty             PICTInputAttributes = "Empty"
	SpanAttrDatabaseSQL       PICTInputAttributes = "DatabaseSQL"
	SpanAttrDatabaseNoSQL     PICTInputAttributes = "DatabaseNoSQL"
	SpanAttrFaaSDatasource    PICTInputAttributes = "FaaSDatasource"
	SpanAttrFaaSHTTP          PICTInputAttributes = "FaaSHTTP"
	SpanAttrFaaSPubSub        PICTInputAttributes = "FaaSPubSub"
	SpanAttrFaaSTimer         PICTInputAttributes = "FaaSTimer"
	SpanAttrFaaSOther         PICTInputAttributes = "FaaSOther"
	SpanAttrHTTPClient        PICTInputAttributes = "HTTPClient"
	SpanAttrHTTPServer        PICTInputAttributes = "HTTPServer"
	SpanAttrMessagingProducer PICTInputAttributes = "MessagingProducer"
	SpanAttrMessagingConsumer PICTInputAttributes = "MessagingConsumer"
	SpanAttrGRPCClient        PICTInputAttributes = "gRPCClient"
	SpanAttrGRPCServer        PICTInputAttributes = "gRPCServer"
	SpanAttrInternal          PICTInputAttributes = "Internal"
	SpanAttrMaxCount          PICTInputAttributes = "MaxCount"
)

type PICTInputInstrumentationLibrary

type PICTInputInstrumentationLibrary string

PICTInputInstrumentationLibrary enum for the number and kind of instrumentation library instances that can be generated.

const (
	LibraryNone PICTInputInstrumentationLibrary = "None"
	LibraryOne  PICTInputInstrumentationLibrary = "One"
	LibraryTwo  PICTInputInstrumentationLibrary = "Two"
)

type PICTInputKind

type PICTInputKind string

PICTInputKind enum for the span kind values that can be set for a span.

const (
	SpanKindUnspecified PICTInputKind = "Unspecified"
	SpanKindInternal    PICTInputKind = "Internal"
	SpanKindServer      PICTInputKind = "Server"
	SpanKindClient      PICTInputKind = "Client"
	SpanKindProducer    PICTInputKind = "Producer"
	SpanKindConsumer    PICTInputKind = "Consumer"
)

type PICTInputParent

type PICTInputParent string

PICTInputParent enum for the parent/child types of spans that can be generated.

const (
	SpanParentRoot  PICTInputParent = "Root"
	SpanParentChild PICTInputParent = "Child"
)

type PICTInputResource

type PICTInputResource string

PICTInputResource enum for the supported types of resource instances that can be generated.

const (
	ResourceEmpty     PICTInputResource = "Empty"
	ResourceVMOnPrem  PICTInputResource = "VMOnPrem"
	ResourceVMCloud   PICTInputResource = "VMCloud"
	ResourceK8sOnPrem PICTInputResource = "K8sOnPrem"
	ResourceK8sCloud  PICTInputResource = "K8sCloud"
	ResourceFaas      PICTInputResource = "Faas"
	ResourceExec      PICTInputResource = "Exec"
)

type PICTInputSpanChild

type PICTInputSpanChild string

PICTInputSpanChild enum for the categories of events and/or links a generated span can be populated with.

const (
	SpanChildCountEmpty PICTInputSpanChild = "Empty"
	SpanChildCountOne   PICTInputSpanChild = "One"
	SpanChildCountTwo   PICTInputSpanChild = "Two"
	SpanChildCountEight PICTInputSpanChild = "Eight"
)

type PICTInputSpans

type PICTInputSpans string

PICTInputSpans enum for the relative sizes of tracing spans that can be attached to an instrumentation library span instance.

const (
	LibrarySpansNone    PICTInputSpans = "None"
	LibrarySpansOne     PICTInputSpans = "One"
	LibrarySpansSeveral PICTInputSpans = "Several"
	LibrarySpansAll     PICTInputSpans = "All"
)

type PICTInputStatus

type PICTInputStatus string

PICTInputStatus enum for the status values a generated span can be populated with.

const (
	SpanStatusUnset PICTInputStatus = "Unset"
	SpanStatusOk    PICTInputStatus = "Ok"
	SpanStatusError PICTInputStatus = "Error"
)

type PICTInputTracestate

type PICTInputTracestate string

PICTInputTracestate enum for the categories of tracestate values that can be generated for a span.

const (
	TraceStateEmpty PICTInputTracestate = "Empty"
	TraceStateOne   PICTInputTracestate = "One"
	TraceStateFour  PICTInputTracestate = "Four"
)

type PICTMetricDataType added in v0.10.0

type PICTMetricDataType string

PICTMetricDataType enumerates the types of metrics that can be generated.

const (
	MetricTypeIntGauge                 PICTMetricDataType = "IntGauge"
	MetricTypeMonotonicIntSum          PICTMetricDataType = "MonotonicIntSum"
	MetricTypeNonMonotonicIntSum       PICTMetricDataType = "NonMonotonicIntSum"
	MetricTypeDoubleGauge              PICTMetricDataType = "DoubleGauge"
	MetricTypeMonotonicDoubleSum       PICTMetricDataType = "MonotonicDoubleSum"
	MetricTypeNonMonotonicDoubleSum    PICTMetricDataType = "NonMonotonicDoubleSum"
	MetricTypeDoubleExemplarsHistogram PICTMetricDataType = "DoubleExemplarsHistogram"
	MetricTypeIntExemplarsHistogram    PICTMetricDataType = "IntExemplarsHistogram"
)

type PICTMetricInputs added in v0.7.0

type PICTMetricInputs struct {
	// Specifies the number of points on each metric.
	NumPtsPerMetric PICTNumPtsPerMetric
	// Specifies the types of metrics that can be generated.
	MetricType PICTMetricDataType
	// Specifies the number of labels on each datapoint.
	NumPtLabels PICTNumPtLabels
	// Specifies the number of attributes on each resource.
	NumResourceAttrs PICTNumResourceAttrs
}

PICTMetricInputs defines one pairwise combination of MetricData variations

type PICTNumPtLabels added in v0.7.0

type PICTNumPtLabels string

PICTNumPtLabels enumerates the number of labels on each datapoint.

const (
	LabelsNone PICTNumPtLabels = "NoLabels"
	LabelsOne  PICTNumPtLabels = "OneLabel"
	LabelsMany PICTNumPtLabels = "ManyLabels"
)

type PICTNumPtsPerMetric added in v0.7.0

type PICTNumPtsPerMetric string

PICTNumPtsPerMetric enum for the number of points on each metric.

const (
	NumPtsPerMetricOne  PICTNumPtsPerMetric = "OnePt"
	NumPtsPerMetricMany PICTNumPtsPerMetric = "ManyPts"
)

type PICTNumResourceAttrs added in v0.7.0

type PICTNumResourceAttrs string

PICTNumResourceAttrs enum for the number of attributes on each resource.

const (
	AttrsNone PICTNumResourceAttrs = "NoAttrs"
	AttrsOne  PICTNumResourceAttrs = "OneAttr"
	AttrsTwo  PICTNumResourceAttrs = "TwoAttrs"
)

type PICTSpanInputs

type PICTSpanInputs struct {
	// Specifies whether the ParentSpanId field should be populated or not
	Parent PICTInputParent
	// Specifies the category of contents to populate the TraceState field with
	Tracestate PICTInputTracestate
	// Specifies the value to populate the Kind field with
	Kind PICTInputKind
	// Specifies the category of values to populate the Attributes field with
	Attributes PICTInputAttributes
	// Specifies the category of contents to populate the Events field with
	Events PICTInputSpanChild
	// Specifies the category of contents to populate the Links field with
	Links PICTInputSpanChild
	// Specifies the value to populate the Status field with
	Status PICTInputStatus
}

PICTSpanInputs defines one pairwise combination of Span variations

type PICTTracingInputs

type PICTTracingInputs struct {
	// Specifies the category of attributes to populate the Resource field with
	Resource PICTInputResource
	// Specifies the number and library categories to populte the InstrumentationLibrarySpans field with
	InstrumentationLibrary PICTInputInstrumentationLibrary
	// Specifies the relative number of spans to populate the InstrumentationLibrarySpans' Spans field with
	Spans PICTInputSpans
}

PICTTracingInputs defines one pairwise combination of ResourceSpans variations

Jump to

Keyboard shortcuts

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