# How to get entire enriched "event" size (not message size)

**URL:** <https://discuss.elastic.co/t/how-to-get-entire-enriched-event-size-not-message-size/255184>\
**Category:** Logstash\
**Created:** [November 12, 2020, 9:44am UTC](https://discuss.elastic.co/t/how-to-get-entire-enriched-event-size-not-message-size/255184 "2020-11-12T09:44:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [November 12, 2020, 9:44am UTC](https://discuss.elastic.co/t/how-to-get-entire-enriched-event-size-not-message-size/255184/1 "2020-11-12T09:44:35Z")

</div>

hi  
As per the link below, we got the size of the "message" field

> [@Message size added as Attribute](https://discuss.elastic.co/t/message-size-added-as-attribute/89922):
>
> Hi, I want to add the size in Bytes of a message to as an attribute of that message, is this possible? I have seen a some try this before with the ruby plugin, but I have been unable to get this to work. Thanks in advance!

But after doing transformation, we need to have the size of the final event also. How to get it?  
I tried

```auto
event.set('event_size', event.get('_source').bytesize)

```

But didn't work

---

<div class="post-metadata">

**Author:** ![BBQigniter](https://avatars.discourse-cdn.com/v4/letter/b/3da27b/32.png) [@BBQigniter](https://discuss.elastic.co/u/BBQigniter)\
**Post date:** [November 12, 2020, 1:17pm UTC](https://discuss.elastic.co/t/how-to-get-entire-enriched-event-size-not-message-size/255184/2 "2020-11-12T13:17:41Z")

</div>

is maybe this what you want?

> **[Mapper Size Plugin | Elasticsearch Plugins and Integrations \[7.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-size.html)**

---

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [November 13, 2020, 10:05am UTC](https://discuss.elastic.co/t/how-to-get-entire-enriched-event-size-not-message-size/255184/3 "2020-11-13T10:05:53Z")

</div>

sorry mate, can't install external plugins in our installation

---

<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:** [December 11, 2020, 10:05am UTC](https://discuss.elastic.co/t/how-to-get-entire-enriched-event-size-not-message-size/255184/4 "2020-12-11T10:05:53Z")

</div>

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