Skip to content

Collector

Neblic uses a custom build of the OpenTelemetry Collector. The OpenTelemetry Collector is an amazing modular collector built by the OpenTelemetry community that can be customized by adding components at build time. Neblic's Control Plane server is packaged in an OpenTelemetry Collector processor so that it can be bundled into a custom OpenTelemetry Collector build using the OpenTelemetry Collector Builder (ocb).

An OpenTelemtry Collector with the Control Plane server built-in is provided in each Neblic Platform release.

You can see what other components are included in its ocb configuration file (see Appendix A). If you want to build your own OpenTelemetry Collector with the Neblic Control Plane server and additional components, you can check this page.

Warning

Since Neblic's Control Plane server is the central point where all Samplers register and where clients connect to configure them, it is not recommended to run multiple collectors (e.g. as an agent in each host) running in the same cluster. If you do so, you will have to connect to multiple locations to configure your Samplers.

Deployment

The recommended approach is to deploy the Collector using the provided container. You can find the latest release in here and a short guide is provided in the usage page

Configuration

The collector is configured using a YAML configuration file. However, if you are using a container, you can configure most options using environment variables. To use a custom configuration file run use the --config flag.

otelcol --config /path/to/config.yaml

Here you can find an up-to-date complete configuration file that you can use as a reference, the reference configuration file is also the configuration that is shipped with the container.

Control plane

Note

Even if you are only deploying the collector to use the included Control Plane server, you still need to configure and enable a data pipeline with a receiver and an exporter.

See the annotated reference documentation (connector.neblic section) to see what options are required to configure the Control Plane server.

To communicate with the Collector Control Plane you can use the CLI command neblictl. This page shows how to use it to configure Samplers.

Data Plane

The Data Plane uses the standard OTLP logging receiver. Neblic doesn't require any special configuration, so it is enough to simply enable it by setting up an endpoint.

Neblic also provides a custom Bearer authenticator that can be used to authenticate Sampler connections when TLS is enabled. You will only need it if you want to connect using a Bearer token to authenticate with the Data Plane server.

Appendix A:

# NOTE: the builder is expected to be run from the repo root

dist:
  name: otelcol
  otelcol_version: 0.94.1
  output_path: ./dist/otelcol/build/
replaces:
  # we use a replace instead of setting the path so the resulting replace is relative instead of absulte
  # this allows us to build the resulting sources inside a container as long as the platform is that path
  - github.com/neblic/platform v0.0.0 => ../../../

exporters:
  - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.94.1
  - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.94.1
# --8<-- [start:LokiExporter]
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.94.0
# --8<-- [end:LokiExporter]
processors:
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.94.0
  - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.94.1
# --8<-- [start:TransformProcessor]
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.94.0
# --8<-- [end:TransformProcessor]
connectors:
  - import: github.com/neblic/platform/controlplane/server/otelcolext
    gomod: github.com/neblic/platform v0.0.0
receivers:
  - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.94.1
extensions:
  - import: github.com/neblic/platform/controlplane/server/otelcolext/bearerauthextension
    gomod: github.com/neblic/platform v0.0.0
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.94.0
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.94.0