# Use of \[@metadata\] in logstash 2.0

**URL:** https://discuss.elastic.co/t/use-of-metadata-in-logstash-2-0/34191
**Category:** Logstash
**Created:** [November 9, 2015, 7:22pm UTC](https://discuss.elastic.co/t/use-of-metadata-in-logstash-2-0/34191 "2015-11-09T19:22:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Philip\_Pum](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@Philip\_Pum](https://discuss.elastic.co/u/Philip_Pum)
#### Post date: [November 9, 2015, 7:22pm UTC](https://discuss.elastic.co/t/use-of-metadata-in-logstash-2-0/34191/1 "2015-11-09T19:22:22Z")

</div>

I read about the use of the [@metadata] field in the 1.5 version ([https://www.elastic.co/blog/logstash-metadata](https://www.elastic.co/blog/logstash-metadata)) and wanted to try it out on logstash 2.0. Unfortunately, there seems to be no way of forcing to output metadata fields in the output{} filters.

Is the the use of [@metadata] still recommended in version 2.0 or is it deprecated?

---

<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: [November 9, 2015, 7:32pm UTC](https://discuss.elastic.co/t/use-of-metadata-in-logstash-2-0/34191/2 "2015-11-09T19:32:47Z")

</div>

> Unfortunately, there seems to be no way of forcing to output metadata fields in the output{} filters.

The [rubydebug codec](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-rubydebug.html) has an option to include `@metadata`. That the outputs ignore that field is the whole point.

> Is the the use of [@metadata] still recommended in version 2.0 or is it deprecated?

It's not deprecated.

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [November 9, 2015, 8:09pm UTC](https://discuss.elastic.co/t/use-of-metadata-in-logstash-2-0/34191/3 "2015-11-09T20:09:57Z")

</div>

As @magnusbaeck has pointed out, `@metadata` was designed specifically to _not_ output. You can copy anything out of `@metadata` with mutate and sprintf formatting, as appropriate.

---

<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: [July 6, 2017, 5:23am UTC](https://discuss.elastic.co/t/use-of-metadata-in-logstash-2-0/34191/4 "2017-07-06T05:23:20Z")

</div>


