_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c13400
train
// ImportMetric receives a metric from another veneur instance
{ "resource": "" }
c13401
train
// ImportMetricGRPC receives a metric from another veneur instance over gRPC. // // In practice, this is only called when in the aggregation tier, so we don't // handle LocalOnly scope.
{ "resource": "" }
c13402
train
// Flush resets the worker's internal metrics and returns their contents.
{ "resource": "" }
c13403
train
// NewEventWorker creates an EventWorker ready to collect events and service checks.
{ "resource": "" }
c13404
train
// Work will start the EventWorker listening for events and service checks. // This function will never return.
{ "resource": "" }
c13405
train
// Flush returns the EventWorker's stored events and service checks and // resets the stored contents.
{ "resource": "" }
c13406
train
// NewSpanWorker creates a SpanWorker ready to collect events and service checks.
{ "resource": "" }
c13407
train
// Flush invokes flush on each sink.
{ "resource": "" }
c13408
train
// ReadProxyConfig unmarshals the proxy config file and slurps in its data.
{ "resource": "" }
c13409
train
// ParseInterval handles parsing the flush interval as a time.Duration
{ "resource": "" }
c13410
train
// RefreshDestinations updates the server's list of valid destinations // for flushing. This should be called periodically to ensure we have // the latest data.
{ "resource": "" }
c13411
train
// ProxyMetrics takes a slice of JSONMetrics and breaks them up into // multiple HTTP requests by MetricKey using the hash ring.
{ "resource": "" }
c13412
train
// ImportMetrics feeds a slice of json metrics to the server's workers
{ "resource": "" }
c13413
train
// iterate over a sorted set of jsonmetrics, returning them in contiguous // nonempty chunks such that each chunk corresponds to a single worker.
{ "resource": "" }
c13414
train
// submitter runs for the lifetime of the sink and performs batch-wise // submission to the HEC sink.
{ "resource": "" }
c13415
train
// setupHTTPRequest sets up and kicks off an HTTP request. It returns // the elements of it that are necessary in sending a single batch to // the HEC.
{ "resource": "" }
c13416
train
// submitOneEvent takes one event and submits it to an HEC HTTP // connection. It observes the configured splunk_hec_ingest_timeout - // if the timeout is exceeded, it returns an error. If the timeout is // 0, it waits forever to submit the event.
{ "resource": "" }
c13417
train
// Flush takes the batched-up events and sends them to the HEC // endpoint for ingestion. If set, it uses the send timeout configured // for the span batch.
{ "resource": "" }
c13418
train
// NewLightStepSpanSink creates a new instance of a LightStepSpanSink.
{ "resource": "" }
c13419
train
// Ingest takes in a span and passed it along to the LS client after // some sanity checks and improvements are made.
{ "resource": "" }
c13420
train
// Flush doesn't need to do anything to the LS tracer, so we emit metrics // instead.
{ "resource": "" }
c13421
train
// NewConsul creates a new instance of a Consul Discoverer
{ "resource": "" }
c13422
train
// sendMetrics enqueues the metrics into the worker channels
{ "resource": "" }
c13423
train
// Ingest extracts metrics from an SSF span, and feeds them into the // appropriate metric sinks.
{ "resource": "" }
c13424
train
// NewSocket creates a socket which is intended for use by a single goroutine.
{ "resource": "" }
c13425
train
// Flush the metrics from the LocalFilePlugin
{ "resource": "" }
c13426
train
// IsFramingError returns true if an error is a wire protocol framing // error. This indicates that the stream can no longer be used for // reading SSF data and should be closed.
{ "resource": "" }
c13427
train
// Add appends a sample to the batch of samples.
{ "resource": "" }
c13428
train
// Timestamp is a functional option for creating an SSFSample. It sets // the timestamp field on the sample to the timestamp passed.
{ "resource": "" }
c13429
train
// TimeUnit sets the unit on a sample to the given resolution's SI // unit symbol. Valid resolutions are the time duration constants from // Nanosecond through Hour. The non-SI units "minute" and "hour" are // represented by "min" and "h" respectively. // // If a resolution is passed that does not correspond exactly to...
{ "resource": "" }
c13430
train
// Gauge returns an SSFSample representing a gauge at a certain // value. It's a convenience wrapper around constructing SSFSample // objects.
{ "resource": "" }
c13431
train
// Histogram returns an SSFSample representing a value on a histogram, // like a timer or other range. It's a convenience wrapper around // constructing SSFSample objects.
{ "resource": "" }
c13432
train
// Set returns an SSFSample representing a value on a set, useful for // counting the unique values that occur in a certain time bound.
{ "resource": "" }
c13433
train
// Status returns an SSFSample capturing the reported state // of a service
{ "resource": "" }
c13434
train
// IsAcceptableMetric returns true if a metric is meant to be ingested // by a given sink.
{ "resource": "" }
c13435
train
// populate a single t-digest, of a given compression, with a given number of // samples, drawn from the given distribution function // then writes various statistics to the given CSVs
{ "resource": "" }
c13436
train
// Return a gRPC connection for the input destination. The ok value indicates // if the key was found in the map.
{ "resource": "" }
c13437
train
// Add the destination to the map, and open a new connection to it. If the // destination already exists, this is a no-op.
{ "resource": "" }
c13438
train
// Delete a destination from the map and close the associated connection. This // is a no-op if the destination doesn't exist.
{ "resource": "" }
c13439
train
// Keys returns all of the destinations in the map.
{ "resource": "" }
c13440
train
// Clear removes all keys from the map and closes each associated connection.
{ "resource": "" }
c13441
train
// NewClient constructs a new signalfx HTTP client for the given // endpoint and API token.
{ "resource": "" }
c13442
train
// NewSignalFxSink creates a new SignalFx sink for metrics.
{ "resource": "" }
c13443
train
// Start begins the sink. For SignalFx this is a noop.
{ "resource": "" }
c13444
train
// client returns a client that can be used to submit to vary-by tag's // value. If no client is specified for that tag value, the default // client is returned.
{ "resource": "" }
c13445
train
// newPointCollection creates an empty collection object and returns it
{ "resource": "" }
c13446
train
// FlushOtherSamples sends events to SignalFx. Event type samples will be serialized as SFX // Events directly. All other metric types are ignored
{ "resource": "" }
c13447
train
// HandleTracePacket accepts an incoming packet as bytes and sends it to the // appropriate worker.
{ "resource": "" }
c13448
train
// ReadMetricSocket listens for available packets to handle.
{ "resource": "" }
c13449
train
// Splits the read metric packet into multiple metrics and handles them
{ "resource": "" }
c13450
train
// ReadStatsdDatagramSocket reads statsd metrics packets from connection off a unix datagram socket.
{ "resource": "" }
c13451
train
// ReadSSFPacketSocket reads SSF packets off a packet connection.
{ "resource": "" }
c13452
train
// ReadTCPSocket listens on Server.TCPAddr for new connections, starting a goroutine for each.
{ "resource": "" }
c13453
train
// HTTPServe starts the HTTP server and listens perpetually until it encounters an unrecoverable error.
{ "resource": "" }
c13454
train
// registerPlugin registers a plugin for use // on the veneur server. It is blocking // and not threadsafe.
{ "resource": "" }
c13455
train
// CalculateTickDelay takes the provided time, `Truncate`s it a rounded-down // multiple of `interval`, then adds `interval` back to find the "next" tick.
{ "resource": "" }
c13456
train
// Set the list of tags to exclude on each sink
{ "resource": "" }
c13457
train
// ValidTrace returns true if an SSFSpan contains all data necessary // to synthesize a span that can be used as part of a trace.
{ "resource": "" }
c13458
train
// ValidateTrace is identical to ValidTrace, except instead of returning // a boolean, it returns a non-nil error if the SSFSpan cannot be interpreted // as a span, and nil otherwise.
{ "resource": "" }
c13459
train
// WriteSSF writes an SSF span with a preceding v0 frame onto a stream // and returns the number of bytes written, as well as an error. // // If the error matches IsFramingError, the stream must be considered // poisoned and should not be re-used.
{ "resource": "" }
c13460
train
// NewDatadogMetricSink creates a new Datadog sink for trace spans.
{ "resource": "" }
c13461
train
// Flush sends metrics to Datadog
{ "resource": "" }
c13462
train
// NewDatadogSpanSink creates a new Datadog sink for trace spans.
{ "resource": "" }
c13463
train
// Ingest takes the span and adds it to the ringbuffer.
{ "resource": "" }
c13464
train
// Capacity indicates how many spans a client's channel should // accommodate. This parameter can be used on both generic and // networked backends.
{ "resource": "" }
c13465
train
// BufferedSize indicates that a client should have a buffer size // bytes large. See the note on the Buffered option about flushing the // buffer.
{ "resource": "" }
c13466
train
// FlushInterval sets up a buffered client to perform one synchronous // flush per time interval in a new goroutine. The goroutine closes // down when the Client's Close method is called. // // This uses a time.Ticker to trigger the flush, so will not trigger // multiple times if flushing should be slower than the trig...
{ "resource": "" }
c13467
train
// FlushChannel sets up a buffered client to perform one synchronous // flush any time the given channel has a Time element ready. When the // Client is closed, FlushWith invokes the passed stop function. // // This functional option is mostly useful for tests; code intended to // be used in production should rely on F...
{ "resource": "" }
c13468
train
// MaxBackoffTime sets the maximum time duration waited between // reconnection attempts. If this option is not used, the backend uses // DefaultMaxBackoff.
{ "resource": "" }
c13469
train
// ParallelBackends sets the number of parallel network backend // connections to send spans with. Each backend holds a connection to // an SSF receiver open.
{ "resource": "" }
c13470
train
// NewChannelClient constructs and returns a Client that can send // directly into a span receiver channel. It provides an alternative // interface to NewBackendClient for constructing internal and // test-only clients.
{ "resource": "" }
c13471
train
// SetDefaultClient overrides the default client used for recording // traces, and gracefully closes the existing one. // This is not safe to run concurrently with other goroutines.
{ "resource": "" }
c13472
train
// NeutralizeClient sets up a client such that all Record or Flush // operations result in ErrWouldBlock. It dashes all hope of a Client // ever successfully recording or flushing spans, and is mostly useful // in tests.
{ "resource": "" }
c13473
train
// Record instructs the client to serialize and send a span. It does // not wait for a delivery attempt, instead the Client will send the // result from serializing and submitting the span to the channel // done, if it is non-nil. // // Record returns ErrNoClient if client is nil and ErrWouldBlock if // the client is n...
{ "resource": "" }
c13474
train
// Initializes a new merging t-digest using the given compression parameter. // Lower compression values result in reduced memory consumption and less // precision, especially at the median. Values from 20 to 1000 are recommended // in Dunning's paper. // // The debug flag adds a list to each centroid, which stores all...
{ "resource": "" }
c13475
train
// NewMergingFromData returns a MergingDigest with values initialized from // MergingDigestData. This should be the way to generate a MergingDigest // from a serialized protobuf.
{ "resource": "" }
c13476
train
// Adds a new value to the t-digest, with a given weight that must be positive. // Infinities and NaN cannot be added.
{ "resource": "" }
c13477
train
// combine the mainCentroids and tempCentroids in-place into mainCentroids
{ "resource": "" }
c13478
train
// given a quantile, estimate the index of the centroid that contains it using // the given compression
{ "resource": "" }
c13479
train
// Returns a value such that the fraction of values in td below that value is // approximately equal to quantile. Returns NaN if the digest is empty.
{ "resource": "" }
c13480
train
// Merge another digest into this one. Neither td nor other can be shared // concurrently during the execution of this method.
{ "resource": "" }
c13481
train
// This function provides direct access to the internal list of centroids in // this t-digest. Having access to this list is very important for analyzing the // t-digest's statistical properties. However, since it violates the encapsulation // of the t-digest, it should be used sparingly. Mutating the returned slice ca...
{ "resource": "" }
c13482
train
// tallyMetrics gives a slight overestimate of the number // of metrics we'll be reporting, so that we can pre-allocate // a slice of the correct length instead of constantly appending // for performance
{ "resource": "" }
c13483
train
// forwardGRPC forwards all input metrics to a downstream Veneur, over gRPC.
{ "resource": "" }
c13484
train
// Evaluate an XPath and attempt to consume the result as a nodeset.
{ "resource": "" }
c13485
train
// Get the XPath result as a nodeset.
{ "resource": "" }
c13486
train
// Coerce the result into a string
{ "resource": "" }
c13487
train
// Coerce the result into a number
{ "resource": "" }
c13488
train
// Coerce the result into a boolean
{ "resource": "" }
c13489
train
// Add a variable resolver.
{ "resource": "" }
c13490
train
// NewNode takes a C pointer from the libxml2 library and returns a Node instance of // the appropriate type.
{ "resource": "" }
c13491
train
// Add a node as a child of the current node. // Passing in a nodeset will add all the nodes as children of the current node.
{ "resource": "" }
c13492
train
// Insert a node immediately before this node in the document. // Passing in a nodeset will add all the nodes, in order.
{ "resource": "" }
c13493
train
// Insert a node immediately after this node in the document. // Passing in a nodeset will add all the nodes, in order.
{ "resource": "" }
c13494
train
// NodePtr returns a pointer to the underlying C struct.
{ "resource": "" }
c13495
train
// Path returns an XPath expression that can be used to // select this node in the document.
{ "resource": "" }
c13496
train
// Return the attribute node, or nil if the attribute does not exist.
{ "resource": "" }
c13497
train
// Attr returns the value of an attribute. // If you need to check for the existence of an attribute, // use Attribute.
{ "resource": "" }
c13498
train
// Search for nodes that match an XPath. This is the simplest way to look for nodes.
{ "resource": "" }
c13499
train
// Evaluate an XPath and coerce the result to a boolean according to the // XPath rules. In the presence of an error, this function will return false // even if the expression cannot actually be evaluated. // In most cases you are better advised to call EvalXPath; this function is // intended for packages that implemen...
{ "resource": "" }