3.1 Configuration
Exercise
Switch to your Gateway terminal window and open the gateway.yaml file. Update the processors section with the following configuration:
Add a
filterprocessor:
Configure the gateway to exclude spans with the name/_healthz. Theerror_mode: ignoredirective ensures that any errors encountered during filtering are ignored, allowing the pipeline to continue running smoothly. Thetracessection defines the filtering rules, specifically targeting spans named/_healthzfor exclusion.Add the
filterprocessor to thetracespipeline:
Include thefilter/healthprocessor in thetracespipeline. For optimal performance, place the filter as early as possible—right after thememory_limiterand before thebatchprocessor. Here’s how the configuration should look:
This setup ensures that health check related spans (/_healthz) are filtered out early in the pipeline, reducing unnecessary noise in your telemetry data.
Validate the agent configuration using otelbin.io. For reference, the traces: section of your pipelines will look similar to this:
%%{init:{"fontFamily":"monospace"}}%%
graph LR
%% Nodes
REC1( otlp <br>fa:fa-download):::receiver
PRO1(memory_limiter<br>fa:fa-microchip):::processor
PRO3(resource<br>fa:fa-microchip<br>add_mode):::processor
PRO4(filter<br>fa:fa-microchip<br>health):::processor
PRO5(batch<br>fa:fa-microchip):::processor
EXP1( debug <br>fa:fa-upload):::exporter
EXP2(  file  <br>fa:fa-upload<br>traces):::exporter
%% Links
subID1:::sub-traces
subgraph " "
subgraph subID1[**Traces**]
direction LR
REC1 --> PRO1
PRO1 --> PRO4
PRO4 --> PRO3
PRO3 --> PRO5
PRO5 --> EXP1
PRO5 --> EXP2
end
end
classDef receiver,exporter fill:#8b5cf6,stroke:#333,stroke-width:1px,color:#fff;
classDef processor fill:#6366f1,stroke:#333,stroke-width:1px,color:#fff;
classDef con-receive,con-export fill:#45c175,stroke:#333,stroke-width:1px,color:#fff;
classDef sub-traces stroke:#fbbf24,stroke-width:1px, color:#fbbf24,stroke-dasharray: 3 3;