sapmexporter

package module
v0.114.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 13

README

SAPM Exporter

Status
Stability beta: traces
Distributions contrib
Issues Open issues Closed issues
Code Owners @dmitryax, @atoulme

The SAPM exporter builds on the Jaeger proto and adds additional batching on top. This allows the collector to export traces from multiples nodes/services in a single batch. The SAPM proto and some useful related utilities can be found here.

Please review the Collector's security documentation, which contains recommendations on securing sensitive information such as the API key required by this exporter.

Configuration

The following configuration options are required:

  • access_token (no default): AccessToken is the authentication token provided by Splunk Observability Cloud or another backend that supports the SAPM proto. The access token can be obtained from the web app. For details on how to do so please refer the documentation here.
  • endpoint (no default): This is the destination to where traces will be sent to in SAPM format. It must be a full URL and include the scheme, port and path e.g,
https://ingest.us0.signalfx.com/v2/trace. This can be pointed to the SignalFx

backend or to another Otel collector that has the SAPM receiver enabled.

The following configuration options can also be configured:

  • max_connections (default = 100): MaxConnections is used to set a limit to the maximum idle HTTP connection the exporter can keep open.
  • num_workers (default = 8): NumWorkers is the number of workers that should be used to export traces. Exporter can make as many requests in parallel as the number of workers. Note that this will likely be removed in future in favour of processors handling parallel exporting.
  • access_token_passthrough: (default = true) Whether to use "com.splunk.signalfx.access_token" trace resource attribute, if any, as SFx access token. In either case this attribute will be deleted during final translation. Intended to be used in tandem with identical configuration option for SAPM receiver to preserve trace origin.
  • timeout (default = 5s): Is the timeout for every attempt to send data to the backend.
  • log_detailed_response (default = false): Option to log detailed response from Splunk APM. In addition to setting this option to true, debug logging at the Collector level needs to be enabled.
  • compression: Compression method to use for outgoing SAPM requests. Can be one of "gzip", "zstd" or be unspecified. If unspecified then "gzip" compression is used unless disable_compression option is set to true.
  • disable_compression (default = false): If set to true the outgoing requests are not compressed and compression option is ignored.

In addition, this exporter offers queued retry which is enabled by default. Information about queued retry configuration parameters can be found here.

Example:

exporters:
  sapm:
    access_token: YOUR_ACCESS_TOKEN
    access_token_passthrough: true
    endpoint: https://ingest.YOUR_SIGNALFX_REALM.signalfx.com/v2/trace
    max_connections: 100
    num_workers: 8
    log_detailed_response: true

The full list of settings exposed for this exporter are documented here with detailed sample configurations here.

This exporter also offers proxy support as documented here.

Documentation

Overview

Package sapmexporter sends traces to a SAPM endpoint.

Package sapmexporter exports trace data using Splunk's SAPM protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory added in v0.7.0

func NewFactory() exporter.Factory

NewFactory creates a factory for SAPM exporter.

Types

type Config

type Config struct {

	// Endpoint is the destination to where traces will be sent to in SAPM format.
	// It must be a full URL and include the scheme, port and path e.g, https://ingest.signalfx.com/v2/trace
	Endpoint string `mapstructure:"endpoint"`

	// AccessToken is the authentication token provided by SignalFx.
	AccessToken configopaque.String `mapstructure:"access_token"`

	// NumWorkers is the number of workers that should be used to export traces.
	// Exporter can make as many requests in parallel as the number of workers. Defaults to 8.
	NumWorkers uint `mapstructure:"num_workers"`

	// MaxConnections is used to set a limit to the maximum idle HTTP connection the exporter can keep open.
	MaxConnections uint `mapstructure:"max_connections"`

	// Disable compression. If set to true then Compression field is ignored.
	DisableCompression bool `mapstructure:"disable_compression"`

	// Compression method to use (gzip or zstd). Ignored if DisableCompression=true.
	// If unspecified defaults to gzip.
	Compression string `mapstructure:"compression"`

	// Log detailed response from trace ingest.
	LogDetailedResponse bool `mapstructure:"log_detailed_response"`

	splunk.AccessTokenPassthroughConfig `mapstructure:",squash"`

	TimeoutSettings           exporterhelper.TimeoutConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
	QueueSettings             exporterhelper.QueueConfig   `mapstructure:"sending_queue"`
	configretry.BackOffConfig `mapstructure:"retry_on_failure"`
}

Config defines configuration for SAPM exporter.

func (*Config) Validate added in v0.45.0

func (c *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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