# Are tags kept after pruning

**URL:** <https://discuss.elastic.co/t/are-tags-kept-after-pruning/132466>\
**Category:** Logstash\
**Created:** [May 18, 2018, 10:33am UTC](https://discuss.elastic.co/t/are-tags-kept-after-pruning/132466 "2018-05-18T10:33:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkaramol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkaramol/32/22610_2.png) [@pkaramol](https://discuss.elastic.co/u/pkaramol)\
**Post date:** [May 18, 2018, 10:33am UTC](https://discuss.elastic.co/t/are-tags-kept-after-pruning/132466/1 "2018-05-18T10:33:11Z")

</div>

I am using multiple pipelines, one of which (`pipeline_1`) adds some **tags** and sends its data downstream to `pipeline_2` via `tcp` output/input binding.

`pipeline_2`, as soon as it receives the event, it applies a `prune`, e.g.:

```auto
filter {

  prune {
     whitelist_names => ["^somefieldname$"]
   }
}

```

Are the tags added by `pipeline_1` maintained in `pipeline_2` **after** pruning?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 23, 2018, 7:09pm UTC](https://discuss.elastic.co/t/are-tags-kept-after-pruning/132466/2 "2018-05-23T19:09:27Z")

</div>

I _think_ your prune filter will remove the tags. If you want to keep them you need to include `^tags$` in `whitelist_names`.

---

<div class="post-metadata">

**Author:** ![pkaramol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkaramol/32/22610_2.png) [@pkaramol](https://discuss.elastic.co/u/pkaramol)\
**Post date:** [May 24, 2018, 10:11am UTC](https://discuss.elastic.co/t/are-tags-kept-after-pruning/132466/3 "2018-05-24T10:11:08Z")

</div>

You are right this is how it works.  
`prune` will remove **everything** except what is in `whitelist_names` array and the way to maintain tags (if any) is to e.g.

```
filter {

  prune {
     whitelist_names => ["^somefieldname$", "^tags$"]
   }
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 21, 2018, 10:15am UTC](https://discuss.elastic.co/t/are-tags-kept-after-pruning/132466/4 "2018-06-21T10:15:56Z")

</div>

Closed on June 21, 2018, 10:15am UTC

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