# Drop spans with Grafana Agent

**URL:** <https://community.grafana.com/t/drop-spans-with-grafana-agent/77889>\
**Category:** Grafana Tempo\
**Created:** [December 12, 2022, 5:42pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889 "2022-12-12T17:42:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdiorio](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@mdiorio](https://community.grafana.com/u/mdiorio)\
**Post date:** [December 12, 2022, 5:42pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889/1 "2022-12-12T17:42:32Z")

</div>

I’m fairly new to Tracing in general so it’s a big learning curve. We’re using Grafana Agent to receive traces being sent from Containers in our K8S cluster. Currently using OTLP.

But we’re seeing spans for what we want, but also for actuator/prometheus and actuator/health endpoints, that we don’t want to keep in Tempo.

Is it possible to configure Grafana Agent to drop spans that match a naming pattern like actuator.\*?

Thanks!

---

<div class="post-metadata">

**Author:** ![mattdurham](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/mattdurham/32/16568_2.png) [@mattdurham](https://community.grafana.com/u/mattdurham)\
**Post date:** [December 12, 2022, 7:15pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889/2 "2022-12-12T19:15:17Z")

</div>

Hello! Agent dev here. This will be possible in our Flow system we are developing in Agent. Flow will be coming out of experimental and into beta soon. The goal for tracing is to import most of the otel processors, I have created an issue [Flow: `otelcol.processor.spanprocessor` component · Issue #2612 · grafana/agent · GitHub](https://github.com/grafana/agent/issues/2612) to track this if you would like to follow for when it is done.

---

<div class="post-metadata">

**Author:** ![mdiorio](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@mdiorio](https://community.grafana.com/u/mdiorio)\
**Post date:** [December 12, 2022, 7:42pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889/3 "2022-12-12T19:42:55Z")

</div>

Thanks @mattdurham

It’s such a basic thing to want to do, and given how easy it is to do drops for logs and metrics, I figured I was missing something obvious.

---

<div class="post-metadata">

**Author:** ![joeelliott](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@joeelliott](https://community.grafana.com/u/joeelliott)\
**Post date:** [December 12, 2022, 7:44pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889/4 "2022-12-12T19:44:50Z")

</div>

It may be possible now using a remote sampling document. This depends on whether or not your client supports the jaeger remote sampling doc.

> <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.61.0/extension/jaegerremotesampling/README.md>

All Jaeger clients and a few OTEL clients support this. I know Java and Go support this. Unsure on others, but it would allow you to set specific endpoints to have a 0% sampling rate.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [December 12, 2022, 10:20pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889/5 "2022-12-12T22:20:30Z")

</div>

@mattdurham I would say that [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#filter-spans-from-traces) will be better fit, because span needs to be dropped, not modified. Dropping of whole traces will be different story.

---

<div class="post-metadata">

**Author:** ![kagodk](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kagodk](https://community.grafana.com/u/kagodk)\
**Post date:** [July 12, 2023, 8:33pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889/6 "2023-07-12T20:33:31Z")

</div>

Is filterprocessor supported in Grafana Agent at this stage?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [July 11, 2024, 8:34pm UTC](https://community.grafana.com/t/drop-spans-with-grafana-agent/77889/7 "2024-07-11T20:34:14Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
