Skip to content

bhushan-amit/otel-traceprop-processor

Repository files navigation

otel-traceprop-processor v0.1.0

A custom OpenTelemetry Collector processor that injects additional metadata into trace spans as they flow through the pipeline.

This processor is built to demonstrate custom trace manipulation within the OpenTelemetry Collector framework.


🔧 Setup & Usage

1. Build the Custom Collector

Use the OpenTelemetry Collector Builder to generate a custom binary with this processor included:

builder --config=otelcol-builder.yaml

This will generate the custom collector binary at: ./otelcol-dist/otelcol-custom

2. Run the Collector with Configuration

Start the collector using your built binary and a config.yaml that wires up the custom processor:

./otelcol-dist/otelcol-custom --config=config.yaml

3. Test with Generate Sample Traces

Send test traces to the collector using telemetrygen:

telemetrygen traces --otlp-insecure --traces 1

This will emit a single trace to the collector via OTLP gRPC on localhost:4317.

✅ Expected Behavior

If wired correctly, the custom processor will enrich each span with a static attribute (e.g., hello=world).
You can verify this by observing logs in the console or from the configured exporter.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages