Documentation ¶
Overview ¶
Package agent manages the consul-telemetry-collector process, loads the configuration, and sets up and manages the lifecycle of the opentelemetry-otel.
Index ¶
Constants ¶
View Source
const ( // HCPClientID is the environment variable for the hcp client id. HCPClientID = "HCP_CLIENT_ID" // HCPClientIDOpt is the cli opt for the hcp client id. HCPClientIDOpt = "hcp-client-id" // HCPClientSecret is the environment variable for the hcp client secret. HCPClientSecret = "HCP_CLIENT_SECRET" // HCPClientSecretOpt is the cli opt for the hcp client secret. HCPClientSecretOpt = "hcp-client-secret" // HCPResourceID is the environment variable for the hcp resource id. HCPResourceID = "HCP_RESOURCE_ID" // HCPResourceIDOpt is the cli opt for the hcp resource id. HCPResourceIDOpt = "hcp-resource-id" // COOtelHTTPEndpoint is the environment variable for OpenTelemetry HTTP Endpoints where metrics are forwarded. COOtelHTTPEndpoint = "CO_OTEL_HTTP_ENDPOINT" // COOtelHTTPEndpointOpt is the cli opt for the OpenTelemetry HTTP Endpoints where metrics are forwarded. COOtelHTTPEndpointOpt = "http-collector-endpoint" // COOConfigPath is the environment variable for path to the config. COOConfigPath = "COO_CONFIG_PATH" // COOConfigPathOpt is the cli opt for path to the config. COOConfigPathOpt = "config-file-path" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloud ¶
type Cloud struct { ClientID string `hcl:"client_id,optional"` ClientSecret string `hcl:"client_secret,optional"` ResourceID string `hcl:"resource_id,optional"` }
Cloud is the HCP Cloud configuration.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is the interface for running the collector.
func NewAgentCmd ¶
NewAgentCmd returns a new Agent command. It's mean to be only be called once to load configuration.
type Config ¶
type Config struct { Cloud *Cloud `hcl:"cloud,block"` HTTPCollectorEndpoint string `hcl:"http_collector_endpoint,optional"` ConfigFile string ExporterConfig *ExporterConfig `hcl:"exporter_config,block"` }
Config is the global collector configuration.
type ExporterConfig ¶ added in v0.1.0
type ExporterConfig struct { Type string `hcl:"type,label"` Headers map[string]string `hcl:"headers,optional"` Endpoint string `hcl:"endpoint"` Timeout string `hcl:"timeout,optional"` }
ExporterConfig holds configuration options to export metrics to a desired custom endpoint.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service runs a otel.Collector with a configured otel pipeline.
func NewService ¶
NewService returns a new Service based off the past in configuration.
Click to show internal directories.
Click to hide internal directories.