otelcolext

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

OpenTelemetry collector integration

This package implements an OpenTelemetry Collector processor that can be easily integrated with a custom OpenTelemetry collector build as an extension.

To build your own OpenTelemetry Collector that includes Neblic's Control Plane server and its data processing functionalities, you need to follow this guide to install the required tool and prepare a configuration file that includes all your other required components. Then, you need to include the otelcolext processor included in Neblic's platform source code:

processors:
  - import: github.com/neblic/platform/controlplane/server/otelcolext
    gomod: github.com/neblic/platform vX.X.X # Set the proper version
    # Optional: To be able to support `Sampler` `Data Plane` Bearer authentication
  - import: github.com/neblic/platform/controlplane/server/otelcolext/bearerauthextension
    gomod: github.com/neblic/platform vX.X.X # Set the proper version

You can use as a reference the configuration file used to build the collector that Neblic distributes.

Once built, you can learn more about how to use it and configure it in here

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

Types

type AuthConfig

type AuthConfig struct {
	// Configures server authentication, valid values: "bearer"
	Type string `mapstructure:"type"`

	// Bearer configuration
	BearerConfig *BearerConfig `mapstructure:"bearer"`
}

type BearerConfig

type BearerConfig struct {
	// Expected bearer token
	Token string `mapstructure:"token"`
}

type Config

type Config struct {
	// Optional.
	UID string `mapstructure:"uid"`

	// Optional
	Endpoint string `mapstructure:"endpoint"`

	// Optional
	StoragePath string `mapstructure:"storage_path"`

	// Configures TLS (optional)
	// Default value is nil, which will disable TLS.
	TLSConfig *TLSConfig `mapstructure:"tls"`

	// Configures authentication (optional)
	// Default value is nil, which will disable authentication.
	AuthConfig *AuthConfig `mapstructure:"auth"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the extension configuration is valid

type Exporter added in v0.1.0

type Exporter struct {
	// contains filtered or unexported fields
}

func NewExporter added in v0.1.0

func NewExporter(c consumer.Logs) *Exporter

func (*Exporter) Close added in v0.1.0

func (e *Exporter) Close(context.Context) error

func (*Exporter) Export added in v0.1.0

func (e *Exporter) Export(ctx context.Context, otlpLogs dpsample.OTLPLogs) error

type TLSConfig

type TLSConfig struct {
	// Path to the TLS cert to use for TLS required connections. (optional)
	CertFile string `mapstructure:"cert_file"`

	// Path to the TLS key to use for TLS required connections. (optional)
	KeyFile string `mapstructure:"key_file"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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