OpenTelemetry Collector
otel-collector/standalone
Standalone OpenTelemetry Collector for receiving OTLP traces, metrics, and logs
Deploys a standalone OpenTelemetry Collector
into a local Kind cluster. It accepts OTLP over gRPC (host port 30317) and HTTP
(host port 30318) and prints everything it receives to its own logs via the
debug exporter — a lightweight sink for inspecting telemetry during development.
To send telemetry from a Gravitee stack (APIM or AM) into a collector instead,
compose the reusable otel-collector/base layer and enable the export flag — see
Composing with a Gravitee stack
below.
Install gck#
go install github.com/gravitee-io-labs/gck@latest
For other installation methods, see Installation .
Usage#
Create#
gck create --from otel-collector/standalone
Cleanup#
gck delete
Quick Start#
Send a test trace to the OTLP HTTP endpoint:
curl -X POST http://localhost:30318/v1/traces \
-H 'Content-Type: application/json' \
-d '{"resourceSpans":[]}'
Watch received telemetry in the collector’s logs:
kubectl logs -f deploy/otel-collector
The only exporter is debug, which prints received telemetry to the collector’s stdout.
Composing with a Gravitee stack#
The collector layer is also available as an abstract context, otel-collector/base,
that deploys the collector into the observability namespace without its own
cluster. Compose it alongside any APIM or AM context and pass
--enable-otel-collector to point the gateway’s OpenTelemetry exporter at it:
gck create \
--from gravitee-io/oss/apim/jdbc/postgres \
--from otel-collector/base \
--enable-otel-collector
The gateway then exports OTLP traces across namespaces to the collector, and you can follow them with:
kubectl logs -f deploy/otel-collector -n observability
To keep the traces instead of just printing them, compose grafana/base rather
than otel-collector/base — it brings the collector, Tempo and Grafana together
and points the collector’s trace pipeline at Tempo:
gck create \
--from gravitee-io/oss/apim/jdbc/postgres \
--from grafana/base \
--enable-otel-collector
Endpoints
Services this context exposes on your machine after gck create, including the ones it inherits from the contexts it composes. Rows marked with a flag only exist when you pass it.
| Service | URL | Notes | From |
|---|---|---|---|
| OTLP gRPC | localhost:30317 | otel-collector/standalone | |
| OTLP HTTP | http://localhost:30318 | otel-collector/standalone |
Variables
Template variables overridable with --set. Use --set path.segments.var=value to target a specific context in the composition chain.
| Variable | Default | Origin | Description |
|---|---|---|---|
imageRepository | otel/opentelemetry-collector | otel-collector/base | OpenTelemetry Collector Docker image repository |
imageTag | 0.157.0 | otel-collector/base | OpenTelemetry Collector Docker image tag |
namespace | observability | otel-collector/base | Namespace the collector is deployed into, shared with the rest of the observability layer so Tempo and Grafana are reachable by service name |
tempoEndpoint | (empty) | otel-collector/base | OTLP gRPC endpoint of a Tempo instance to forward traces to (e.g. tempo:4317). Empty leaves the debug exporter as the only trace sink. |
clusterName | otel-collector | otel-collector/standalone | Name of the Kind cluster |