consul-telemetry-collector

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MPL-2.0

README

Consul logo Consul Telemetry Collector

Consul Telemetry Collector is a lightweight OpenTelemetry Collector used to collect metrics from Envoy proxies and export them to HCP and other OTLP compliant metrics endpoints. The Envoy stats sink is encrypted and authorized by the Consul service mesh.

Installation

Documentation on deploying the Consul Telemetry Collector to a Kubernetes runtime are provided in the HCP documentation:

Configuration

HCP automatically configures these values for you when you link self-managed clusters using consul-k8s with the -cloud preset. For more information, refer to Consul telemetry collector in the documentation.

All configuration options available are listed below. Use the CLIENT_ID, CLIENT_SECRET, and RESOURCE_ID created for observability from HCP Consul Central to send metrics to HCP.

Configurations load in the following order of precedence:

1. command line opts if specified
2. env variables if specified
3. file configuration
Usage: consul-telemetry-collector agent [options]

        Starts the telemetry-collector and runs until an interrupt is received. The
        collector can forward all metrics to an otlphttp endpoint or to the Hashicorp
        cloud platform.

  -config-file-path=<string>
     Load configuration from a config file.

  -hcp-client-id=<string>
     HCP Service Principal Client ID Environment variable HCP_CLIENT_ID

  -hcp-client-secret=<string>
     HCP Service Principal Client Secret Environment variable
     HCP_CLIENT_SECRET

  -hcp-resource-id=<string>
     HCP Resource ID Environment variable HCP_RESOURCE_ID

  -http-collector-endpoint=<string>
     OTLP HTTP endpoint to forward telemetry to Environment variable
     CO_OTEL_HTTP_ENDPOINT

Development

Build

Binary
make dev
Docker Image
make docker

Test

Unit Tests
make unit-tests

Directories

Path Synopsis
cmd
consul-telemetry-collector
Package main has the CLI entrypoint of the collector.
Package main has the CLI entrypoint of the collector.
internal
agent
Package agent manages the consul-telemetry-collector process, loads the configuration, and sets up and manages the lifecycle of the opentelemetry-otel.
Package agent manages the consul-telemetry-collector process, loads the configuration, and sets up and manages the lifecycle of the opentelemetry-otel.
flags
Package flags is a helper module that can be used to provide common functionality for flag sets
Package flags is a helper module that can be used to provide common functionality for flag sets
hcp
Package hcp handles the low level initialization and execution of the HCP client
Package hcp handles the low level initialization and execution of the HCP client
otel
Package otel handles the configuration and lifecycle of the opentelemetry-collector Its' purpose is to generate a resolver setting that incorporates multiple providers collector consumes otel/providers which consume otel/config
Package otel handles the configuration and lifecycle of the opentelemetry-collector Its' purpose is to generate a resolver setting that incorporates multiple providers collector consumes otel/providers which consume otel/config
otel/config
Package config manages helpers to generate opentelemetry-collector configuration.
Package config manages helpers to generate opentelemetry-collector configuration.
otel/config/helpers/exporters
Package exporters holds the type of exporters that consul telemetery supports
Package exporters holds the type of exporters that consul telemetery supports
otel/config/helpers/extensions
Package extensions holds the type of extensions that consul telemetery supports
Package extensions holds the type of extensions that consul telemetery supports
otel/config/helpers/processors
Package processors holds the type of processors that consul telemetery supports
Package processors holds the type of processors that consul telemetery supports
otel/config/helpers/receivers
Package receivers holds the type of receivers that consul telemetery supports
Package receivers holds the type of receivers that consul telemetery supports
otel/config/helpers/types
Package types is a place to store reused types amongst the helpers
Package types is a place to store reused types amongst the helpers
otel/providers
Package providers contains shared configuration structs for both HCP and external configuration providers.
Package providers contains shared configuration structs for both HCP and external configuration providers.
otel/providers/external
Package external provides a static confmap.Provider that returns static configuration
Package external provides a static confmap.Provider that returns static configuration
otel/providers/hcp
Package hcp will retrieve configuration open-telemetry-collector configuration from HCP
Package hcp will retrieve configuration open-telemetry-collector configuration from HCP
translator/otlp/prometheus
Package prometheus implements a translator to convert prometheus metrics to OTLP metrics.
Package prometheus implements a translator to convert prometheus metrics to OTLP metrics.
version
Package version handles the human read-able version for the consul-telemetry-collector itself and important components
Package version handles the human read-able version for the consul-telemetry-collector itself and important components
receivers
envoyreceiver Module

Jump to

Keyboard shortcuts

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