localdevcollector binary with one you build yourself. This page lists what it must contain, and shows how to build and use it. It assumes you know the OpenTelemetry Collector.
Localdev still generates the collector’s configuration, so your collector runs the same pipeline as localdevcollector (see Use it in your project).
Default configuration for Localdev’s collector
localdevcollector is built with the OpenTelemetry Collector Builder (OCB) 0.165.0 from
builder-config.yaml in the Localdev repository.
It contains a minimal set of components, shown below, which may not be enough for your needs.
builder-config.yaml
Requirements
Localdev generates the collector’s configuration, so your collector must contain at least these components:
Build it with OCB 0.165.0 or newer. The generated configuration uses the
otlp_grpc exporter name, which older versions don’t recognise.
Build your own collector
-
Download OCB for your platform. The release assets are named
ocb_<version>_<darwin|linux>_<amd64|arm64>: -
Copy the
builder-config.yamlabove, changedist.nameanddist.output_path, and add your components. -
Build it:
Use it in your project
Pointcollector.command in the Projectfile to your collector:
- Use an absolute path, or a name found on
PATH. A relative path is resolved from the directory you runldevin, not the Projectfile’s directory. - Localdev adds
--config=<generated file>to your command. Other arguments incommandare kept, and are split the same way as a service’scommand.
- Receives OTLP gRPC on
localhost:4998and OTLP HTTP onlocalhost:4999, or on the ports incollector.receivers. - Sends traces, metrics and logs through
batchand exports them over OTLP gRPC to Localdev (-collector-address,localhost:50000by default), without TLS. - Can’t be replaced from the Projectfile. You can see its path in the UI under Project → Collector.
localdevcollector-out.log in Localdev’s temporary directory.
