Fix comments for exported funcs/vars/consts (#2938)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
parent
8235b261e3
commit
d6a0f9ab76
|
|
@ -63,7 +63,7 @@ func (f *nopExporterFactory) CreateMetricsExporter(
|
|||
return nopExporterInstance, nil
|
||||
}
|
||||
|
||||
// CreateMetricsExporter implements component.ExporterFactory interface.
|
||||
// CreateLogsExporter implements component.ExporterFactory interface.
|
||||
func (f *nopExporterFactory) CreateLogsExporter(
|
||||
_ context.Context,
|
||||
_ component.ExporterCreateParams,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ func (f *nopProcessorFactory) CreateMetricsProcessor(
|
|||
return nopProcessorInstance, nil
|
||||
}
|
||||
|
||||
// CreateMetricsProcessor implements component.ProcessorFactory interface.
|
||||
// CreateLogsProcessor implements component.ProcessorFactory interface.
|
||||
func (f *nopProcessorFactory) CreateLogsProcessor(
|
||||
_ context.Context,
|
||||
_ component.ProcessorCreateParams,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ func (f *nopReceiverFactory) CreateMetricsReceiver(
|
|||
return nopReceiverInstance, nil
|
||||
}
|
||||
|
||||
// CreateMetricsReceiver implements component.ReceiverFactory interface.
|
||||
// CreateLogsReceiver implements component.ReceiverFactory interface.
|
||||
func (f *nopReceiverFactory) CreateLogsReceiver(
|
||||
_ context.Context,
|
||||
_ component.ReceiverCreateParams,
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ type Host interface {
|
|||
// other components that it creates.
|
||||
GetFactory(kind Kind, componentType config.Type) Factory
|
||||
|
||||
// Return map of extensions. Only enabled and created extensions will be returned.
|
||||
// GetExtensions returns the map of extensions. Only enabled and created extensions will be returned.
|
||||
// Typically is used to find an extension by type or by full config name. Both cases
|
||||
// can be done by iterating the returned map. There are typically very few extensions
|
||||
// so there there is no performance implications due to iteration.
|
||||
GetExtensions() map[config.NamedEntity]Extension
|
||||
|
||||
// Return map of exporters. Only enabled and created exporters will be returned.
|
||||
// GetExporters returns the map of exporters. Only enabled and created exporters will be returned.
|
||||
// Typically is used to find exporters by type or by full config name. Both cases
|
||||
// can be done by iterating the returned map. There are typically very few exporters
|
||||
// so there there is no performance implications due to iteration.
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ type headerRoundTripper struct {
|
|||
headers map[string]string
|
||||
}
|
||||
|
||||
// Custom RoundTrip that add headers
|
||||
// RoundTrip is a custom RoundTripper that adds headers to the request.
|
||||
func (interceptor *headerRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
for k, v := range interceptor.headers {
|
||||
req.Header.Set(k, v)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ func newCollector(config *Config, logger *zap.Logger) *collector {
|
|||
}
|
||||
}
|
||||
|
||||
// Collector dynamically allocates metrics, describe shoud be noop
|
||||
// Describe is a no-op, because the collector dynamically allocates metrics.
|
||||
// https://github.com/prometheus/client_golang/blob/v1.9.0/prometheus/collector.go#L28-L40
|
||||
func (c *collector) Describe(_ chan<- *prometheus.Desc) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ const (
|
|||
LabelsMany PICTNumPtLabels = "ManyLabels"
|
||||
)
|
||||
|
||||
// Enumerates the number of points on each metric.
|
||||
// PICTNumPtsPerMetric enum for the number of points on each metric.
|
||||
type PICTNumPtsPerMetric string
|
||||
|
||||
const (
|
||||
|
|
@ -59,7 +59,7 @@ const (
|
|||
NumPtsPerMetricMany PICTNumPtsPerMetric = "ManyPts"
|
||||
)
|
||||
|
||||
// Enumerates the number of attributes on each resource.
|
||||
// PICTNumResourceAttrs enum for the number of attributes on each resource.
|
||||
type PICTNumResourceAttrs string
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ const (
|
|||
TracesColumnSpans = 2
|
||||
)
|
||||
|
||||
// Enumerates the supported types of resource instances that can be generated.
|
||||
// PICTInputResource enum for the supported types of resource instances that can be generated.
|
||||
type PICTInputResource string
|
||||
|
||||
const (
|
||||
|
|
@ -37,7 +37,7 @@ const (
|
|||
ResourceExec PICTInputResource = "Exec"
|
||||
)
|
||||
|
||||
// Enumerates the number and kind of instrumentation library instances that can be generated.
|
||||
// PICTInputInstrumentationLibrary enum for the number and kind of instrumentation library instances that can be generated.
|
||||
type PICTInputInstrumentationLibrary string
|
||||
|
||||
const (
|
||||
|
|
@ -46,7 +46,7 @@ const (
|
|||
LibraryTwo PICTInputInstrumentationLibrary = "Two"
|
||||
)
|
||||
|
||||
// Enumerates the relative sizes of tracing spans that can be attached to an instrumentation library span instance.
|
||||
// PICTInputSpans enum for the relative sizes of tracing spans that can be attached to an instrumentation library span instance.
|
||||
type PICTInputSpans string
|
||||
|
||||
const (
|
||||
|
|
@ -79,7 +79,7 @@ const (
|
|||
SpansColumnStatus = 6
|
||||
)
|
||||
|
||||
// Enumerates the parent/child types of spans that can be generated.
|
||||
// PICTInputParent enum for the parent/child types of spans that can be generated.
|
||||
type PICTInputParent string
|
||||
|
||||
const (
|
||||
|
|
@ -87,7 +87,7 @@ const (
|
|||
SpanParentChild PICTInputParent = "Child"
|
||||
)
|
||||
|
||||
// Enumerates the categories of tracestate values that can be generated for a span.
|
||||
// PICTInputTracestate enum for the categories of tracestate values that can be generated for a span.
|
||||
type PICTInputTracestate string
|
||||
|
||||
const (
|
||||
|
|
@ -96,7 +96,7 @@ const (
|
|||
TraceStateFour PICTInputTracestate = "Four"
|
||||
)
|
||||
|
||||
// Enumerates the span kind values that can be set for a span.
|
||||
// PICTInputKind enum for the span kind values that can be set for a span.
|
||||
type PICTInputKind string
|
||||
|
||||
const (
|
||||
|
|
@ -108,7 +108,7 @@ const (
|
|||
SpanKindConsumer PICTInputKind = "Consumer"
|
||||
)
|
||||
|
||||
// Enumerates the categories of representative attributes a generated span can be populated with.
|
||||
// PICTInputAttributes enum for the categories of representative attributes a generated span can be populated with.
|
||||
type PICTInputAttributes string
|
||||
|
||||
const (
|
||||
|
|
@ -131,7 +131,7 @@ const (
|
|||
SpanAttrMaxCount PICTInputAttributes = "MaxCount"
|
||||
)
|
||||
|
||||
// Enumerates the categories of events and/or links a generated span can be populated with.
|
||||
// PICTInputSpanChild enum for the categories of events and/or links a generated span can be populated with.
|
||||
type PICTInputSpanChild string
|
||||
|
||||
const (
|
||||
|
|
@ -142,7 +142,7 @@ const (
|
|||
SpanChildCountEight PICTInputSpanChild = "Eight"
|
||||
)
|
||||
|
||||
// Enumerates the status values a generated span can be populated with.
|
||||
// PICTInputStatus enum for the status values a generated span can be populated with.
|
||||
type PICTInputStatus string
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func (esc *ErrOrSinkConsumer) ConsumeTraces(ctx context.Context, td pdata.Traces
|
|||
return esc.TracesSink.ConsumeTraces(ctx, td)
|
||||
}
|
||||
|
||||
// ConsumeTraces stores traces to this sink.
|
||||
// ConsumeMetrics stores metrics to this sink.
|
||||
func (esc *ErrOrSinkConsumer) ConsumeMetrics(ctx context.Context, md pdata.Metrics) error {
|
||||
esc.mu.Lock()
|
||||
defer esc.mu.Unlock()
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ import (
|
|||
"go.opentelemetry.io/collector/internal/processor/filterset"
|
||||
)
|
||||
|
||||
// TODO: Modify Matcher to invoke both the include and exclude properties so
|
||||
// calling processors will always have the same logic.
|
||||
// Matcher is an interface that allows matching a log record against a
|
||||
// configuration of a match.
|
||||
// TODO: Modify Matcher to invoke both the include and exclude properties so
|
||||
// calling processors will always have the same logic.
|
||||
type Matcher interface {
|
||||
MatchLogRecord(lr pdata.LogRecord, resource pdata.Resource, library pdata.InstrumentationLibrary) bool
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
|
||||
type AttributesMatcher []AttributeMatcher
|
||||
|
||||
// attributeMatcher is a attribute key/value pair to match to.
|
||||
// AttributeMatcher is a attribute key/value pair to match to.
|
||||
type AttributeMatcher struct {
|
||||
Key string
|
||||
// If both AttributeValue and StringFilter are nil only check for key existence.
|
||||
|
|
@ -79,7 +79,7 @@ func NewAttributesMatcher(config filterset.Config, attributes []filterconfig.Att
|
|||
return rawAttributes, nil
|
||||
}
|
||||
|
||||
// match attributes specification against a span/log.
|
||||
// Match attributes specification against a span/log.
|
||||
func (ma AttributesMatcher) Match(attrs pdata.AttributeMap) bool {
|
||||
// If there are no attributes to match against, the span/log matches.
|
||||
if len(ma) == 0 {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ type instrumentationLibraryMatcher struct {
|
|||
Version filterset.FilterSet
|
||||
}
|
||||
|
||||
// propertiesMatcher allows matching a span against various span properties.
|
||||
// PropertiesMatcher allows matching a span against various span properties.
|
||||
type PropertiesMatcher struct {
|
||||
// Instrumentation libraries to compare against
|
||||
libraries []instrumentationLibraryMatcher
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
package regexp
|
||||
|
||||
// RegexpConfig represents the options for a NewFilterSet.
|
||||
// Config represents the options for a NewFilterSet.
|
||||
type Config struct {
|
||||
// CacheEnabled determines whether match results are LRU cached to make subsequent matches faster.
|
||||
// Cache size is unlimited unless CacheMaxNumEntries is also specified.
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ func (bp *batchProcessor) ConsumeTraces(_ context.Context, td pdata.Traces) erro
|
|||
return nil
|
||||
}
|
||||
|
||||
// ConsumeTraces implements MetricsProcessor
|
||||
// ConsumeMetrics implements MetricsProcessor
|
||||
func (bp *batchProcessor) ConsumeMetrics(_ context.Context, md pdata.Metrics) error {
|
||||
// First thing is convert into a different internal format
|
||||
bp.newItem <- md
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for CPU scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "cpu"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for Disk scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "disk"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for FileSystem scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "filesystem"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ func newFileSystemScraper(_ context.Context, cfg *Config) (*scraper, error) {
|
|||
return scraper, nil
|
||||
}
|
||||
|
||||
// Scrape
|
||||
func (s *scraper) Scrape(_ context.Context) (pdata.MetricSlice, error) {
|
||||
metrics := pdata.NewMetricSlice()
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for Load scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "load"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for Memory scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "memory"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ func newMemoryScraper(_ context.Context, cfg *Config) *scraper {
|
|||
return &scraper{config: cfg, virtualMemory: mem.VirtualMemory}
|
||||
}
|
||||
|
||||
// Scrape
|
||||
func (s *scraper) Scrape(_ context.Context) (pdata.MetricSlice, error) {
|
||||
metrics := pdata.NewMetricSlice()
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for Network scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "network"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for Paging scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "paging"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// This file implements Factory for Processes scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "processes"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import (
|
|||
// This file implements Factory for Process scraper.
|
||||
|
||||
const (
|
||||
// The value of "type" key in configuration.
|
||||
// TypeStr the value of "type" key in configuration.
|
||||
TypeStr = "process"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ func newTransaction(ctx context.Context, jobsMap *JobsMap, useStartTimeMetric bo
|
|||
// ensure *transaction has implemented the storage.Appender interface
|
||||
var _ storage.Appender = (*transaction)(nil)
|
||||
|
||||
// always returns 0 to disable label caching
|
||||
// Add always returns 0 to disable label caching.
|
||||
func (tr *transaction) Add(ls labels.Labels, t int64, v float64) (uint64, error) {
|
||||
// Important, must handle. prometheus will still try to feed the appender some data even if it failed to
|
||||
// scrape the remote target, if the previous scrape was success and some data were cached internally
|
||||
|
|
@ -114,7 +114,7 @@ func (tr *transaction) Add(ls labels.Labels, t int64, v float64) (uint64, error)
|
|||
return 0, tr.metricBuilder.AddDataPoint(ls, t, v)
|
||||
}
|
||||
|
||||
// always returns error since caching is not supported by Add() function
|
||||
// AddFast always returns error since caching is not supported by Add() function.
|
||||
func (tr *transaction) AddFast(_ uint64, _ int64, _ float64) error {
|
||||
return storage.ErrNotFound
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ func (tr *transaction) initTransaction(ls labels.Labels) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// submit metrics data to consumers
|
||||
// Commit submits metrics data to consumers.
|
||||
func (tr *transaction) Commit() error {
|
||||
if tr.isNew {
|
||||
// In a situation like not able to connect to the remote server, scrapeloop will still commit even if it had
|
||||
|
|
|
|||
|
|
@ -37,14 +37,14 @@ func (ext *builtExtension) Start(ctx context.Context, host component.Host) error
|
|||
return ext.extension.Start(ctx, host)
|
||||
}
|
||||
|
||||
// Stop the receiver.
|
||||
// Shutdown the receiver.
|
||||
func (ext *builtExtension) Shutdown(ctx context.Context) error {
|
||||
return ext.extension.Shutdown(ctx)
|
||||
}
|
||||
|
||||
var _ component.Extension = (*builtExtension)(nil)
|
||||
|
||||
// Exporters is a map of exporters created from exporter configs.
|
||||
// Extensions is a map of extensions created from extension configs.
|
||||
type Extensions map[config.Extension]*builtExtension
|
||||
|
||||
// StartAll starts all exporters.
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ type builtReceiver struct {
|
|||
receiver component.Receiver
|
||||
}
|
||||
|
||||
// Start the receiver.
|
||||
// Start starts the receiver.
|
||||
func (rcv *builtReceiver) Start(ctx context.Context, host component.Host) error {
|
||||
return rcv.receiver.Start(ctx, host)
|
||||
}
|
||||
|
||||
// Stop the receiver.
|
||||
// Shutdown stops the receiver.
|
||||
func (rcv *builtReceiver) Shutdown(ctx context.Context) error {
|
||||
return rcv.receiver.Shutdown(ctx)
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ func (rcv *builtReceiver) Shutdown(ctx context.Context) error {
|
|||
// Receivers is a map of receivers created from receiver configs.
|
||||
type Receivers map[config.Receiver]*builtReceiver
|
||||
|
||||
// StopAll stops all receivers.
|
||||
// ShutdownAll stops all receivers.
|
||||
func (rcvs Receivers) ShutdownAll(ctx context.Context) error {
|
||||
var errs []error
|
||||
for _, rcv := range rcvs {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ type HeaderData struct {
|
|||
Title string
|
||||
}
|
||||
|
||||
// WriteHTMLFooter writes the header.
|
||||
// WriteHTMLHeader writes the header.
|
||||
func WriteHTMLHeader(w io.Writer, hd HeaderData) {
|
||||
if err := headerTemplate.Execute(w, hd); err != nil {
|
||||
log.Printf("zpages: executing template: %v", err)
|
||||
|
|
@ -127,7 +127,7 @@ type PropertiesTableData struct {
|
|||
Properties [][2]string
|
||||
}
|
||||
|
||||
// WriteHTMLFooter writes the footer.
|
||||
// WriteHTMLPropertiesTable writes the HTML for properties table.
|
||||
func WriteHTMLPropertiesTable(w io.Writer, chd PropertiesTableData) {
|
||||
if err := propertiesTableTemplate.Execute(w, chd); err != nil {
|
||||
log.Printf("zpages: executing template: %v", err)
|
||||
|
|
|
|||
|
|
@ -15,22 +15,21 @@
|
|||
// Package metrics contains functionality for testing an otelcol pipeline end to end for metric correctness.
|
||||
// Partly because of how Prometheus works (being pull-based) metrics correctness works differently than
|
||||
// the performance testbed in the parent directory. Whereas performance testing sends a relatively large
|
||||
// number of datapoints into the collector, this package sends metrics in one at a time, and only sends the
|
||||
// number of data-points into the collector, this package sends metrics in one at a time, and only sends the
|
||||
// next datapoint when the previous datapoint has been processed and compared to the original.
|
||||
//
|
||||
// Mostly simlar to the performance testing pipeline, this pipeline looks like the following:
|
||||
|
||||
// Mostly similar to the performance testing pipeline, this pipeline looks like the following:
|
||||
// [testbed exporter] -> [otelcol receiver] -> [otelcol exporter] -> [testbed receiver] -> [test harness]
|
||||
//
|
||||
// the difference being the testHarness, which is connected to [testbed receiver] as its metrics
|
||||
// consumer, listening for datapoints. To start the process, one datapoint is sent into the testbed
|
||||
// consumer, listening for data-points. To start the process, one datapoint is sent into the testbed
|
||||
// exporter, it goes through the pipeline, and arrives at the testbed receiver, which passes it along to the
|
||||
// test harness. The test harness compares the received datapoint to the original datapoint it sent, and saves
|
||||
// any diffs it found in a diffAccumulator instance. Then it sends the next datapoint. This continues until
|
||||
// there are no more datapoints. The simple diagram above should have a loop, where [test harness] connects
|
||||
// there are no more data-points. The simple diagram above should have a loop, where [test harness] connects
|
||||
// back to [testbed exporter].
|
||||
//
|
||||
// Datapoints are supplied to the testHarness by a metricSupplier, which receives all of the metrics it needs
|
||||
// Data-points are supplied to the testHarness by a metricSupplier, which receives all of the metrics it needs
|
||||
// upfront. Those metrics are in turn generated by a metricGenerator, which receives its config from a PICT
|
||||
// generated file, as the trace correctness funcionality does.
|
||||
// generated file, as the trace correctness functionality does.
|
||||
package metrics
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ func expandExeFileName(exeName string) string {
|
|||
return buf.String()
|
||||
}
|
||||
|
||||
// start a child process.
|
||||
// Start a child process.
|
||||
//
|
||||
// cp.AgentExePath defines the executable to run. If unspecified
|
||||
// "../../bin/otelcol_{{.GOOS}}_{{.GOARCH}}" will be used.
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ type OtelcolRunner interface {
|
|||
// instance(s) this runner manages. If successful, it returns the cleanup config function to be executed after
|
||||
// the test is executed.
|
||||
PrepareConfig(configStr string) (configCleanup func(), err error)
|
||||
// Starts the otelcol instance(s) if not already running which is the subject of the test to be run.
|
||||
// Start starts the otelcol instance(s) if not already running which is the subject of the test to be run.
|
||||
// It returns the host:port of the data receiver to post test data to.
|
||||
Start(args StartParams) error
|
||||
// Stops the otelcol instance(s) which are the subject of the test just run if applicable. Returns whether
|
||||
// Stop stops the otelcol instance(s) which are the subject of the test just run if applicable. Returns whether
|
||||
// the instance was actually stopped or not.
|
||||
Stop() (stopped bool, err error)
|
||||
// WatchResourceConsumption toggles on the monitoring of resource consumpution by the otelcol instance under test.
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ type DataReceiver interface {
|
|||
Start(tc consumer.Traces, mc consumer.Metrics, lc consumer.Logs) error
|
||||
Stop() error
|
||||
|
||||
// Generate a config string to place in exporter part of collector config
|
||||
// GenConfigYAMLStr generates a config string to place in exporter part of collector config
|
||||
// so that it can send data to this receiver.
|
||||
GenConfigYAMLStr() string
|
||||
|
||||
// Return exporterType name to use in collector config pipeline.
|
||||
// ProtocolName returns exporterType name to use in collector config pipeline.
|
||||
ProtocolName() string
|
||||
}
|
||||
|
||||
|
|
@ -66,12 +66,10 @@ func (mb *DataReceiverBase) ReportFatalError(err error) {
|
|||
log.Printf("Fatal error reported: %v", err)
|
||||
}
|
||||
|
||||
// GetFactory of the specified kind. Returns the factory for a component type.
|
||||
func (mb *DataReceiverBase) GetFactory(_ component.Kind, _ config.Type) component.Factory {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Return map of extensions. Only enabled and created extensions will be returned.
|
||||
func (mb *DataReceiverBase) GetExtensions() map[config.NamedEntity]component.Extension {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -278,7 +276,7 @@ func NewOTLPDataReceiver(port int) *BaseOTLPDataReceiver {
|
|||
}
|
||||
}
|
||||
|
||||
// NewOTLPDataReceiver creates a new OTLP/HTTP DataReceiver that will listen on the specified port after Start
|
||||
// NewOTLPHTTPDataReceiver creates a new OTLP/HTTP DataReceiver that will listen on the specified port after Start
|
||||
// is called.
|
||||
func NewOTLPHTTPDataReceiver(port int) *BaseOTLPDataReceiver {
|
||||
return &BaseOTLPDataReceiver{
|
||||
|
|
@ -380,7 +378,6 @@ func (dr *PrometheusDataReceiver) Stop() error {
|
|||
return dr.receiver.Shutdown(context.Background())
|
||||
}
|
||||
|
||||
// Generate exporter yaml
|
||||
func (dr *PrometheusDataReceiver) GenConfigYAMLStr() string {
|
||||
format := `
|
||||
prometheus:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
|
||||
// TestResultsSummary defines the interface to record results of one category of testing.
|
||||
type TestResultsSummary interface {
|
||||
// Create and open the file and write headers.
|
||||
// Init creates and open the file and write headers.
|
||||
Init(resultsDir string)
|
||||
// Add results for one test.
|
||||
Add(testName string, result interface{})
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ service:
|
|||
)
|
||||
}
|
||||
|
||||
// Run 10k data items/sec test using specified sender and receiver protocols.
|
||||
// Scenario10kItemsPerSecond runs 10k data items/sec test using specified sender and receiver protocols.
|
||||
func Scenario10kItemsPerSecond(
|
||||
t *testing.T,
|
||||
sender testbed.DataSender,
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@ package zipkin
|
|||
// These constants are the attribute keys used when translating from zipkin
|
||||
// format to the internal collector data format.
|
||||
const (
|
||||
StartTimeAbsent = "otel.zipkin.absentField.startTime"
|
||||
startTimeAbsent = "otel.zipkin.absentField.startTime"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ func setTimestampsIfUnset(span *tracepb.Span) {
|
|||
if span.Attributes.AttributeMap == nil {
|
||||
span.Attributes.AttributeMap = make(map[string]*tracepb.AttributeValue, 1)
|
||||
}
|
||||
span.Attributes.AttributeMap[StartTimeAbsent] = &tracepb.AttributeValue{
|
||||
span.Attributes.AttributeMap[startTimeAbsent] = &tracepb.AttributeValue{
|
||||
Value: &tracepb.AttributeValue_BoolValue{
|
||||
BoolValue: true,
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ func TestSpanWithoutTimestampGetsTag(t *testing.T) {
|
|||
|
||||
wantAttributes := &tracepb.Span_Attributes{
|
||||
AttributeMap: map[string]*tracepb.AttributeValue{
|
||||
StartTimeAbsent: {
|
||||
startTimeAbsent: {
|
||||
Value: &tracepb.AttributeValue_BoolValue{
|
||||
BoolValue: true,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue