# Logs stored in grails size to calculate cost of increased retention

**URL:** <https://community.dynatrace.com/t/logs-stored-in-grails-size-to-calculate-cost-of-increased-retention/45747>\
**Category:** Logs\
**Tags:** logs, licensing\
**Created:** [May 24, 2024, 4:51am UTC](https://community.dynatrace.com/t/logs-stored-in-grails-size-to-calculate-cost-of-increased-retention/45747 "2024-05-24T04:51:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro\_Marce](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Pedro\_Marce](https://community.dynatrace.com/u/Pedro_Marce)\
**Post date:** [May 24, 2024, 4:51am UTC](https://community.dynatrace.com/t/logs-stored-in-grails-size-to-calculate-cost-of-increased-retention/45747/1 "2024-05-24T04:51:51Z")

</div>

Hi,

Well, the question probably says it all, but I am looking at increasing retention of certain logs (potentially all), but I need to be able to calculate how many Gbs of data I have currently stored to be able to do so.

I have seen a couple of old posts indicating some options that don’t seem to be valid anymore, and it feels it should be a fairly easy information to get, but couldn’t find the way.

Thanks,

---

<div class="post-metadata">

**Author:** ![JoseRomero](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/joseromero/32/19486_2.png) [@JoseRomero](https://community.dynatrace.com/u/JoseRomero)\
**Post date:** [May 24, 2024, 2:51pm UTC](https://community.dynatrace.com/t/logs-stored-in-grails-size-to-calculate-cost-of-increased-retention/45747/2 "2024-05-24T14:51:30Z")

</div>

Hi Pedro,

May be this can help you.

```javascript
fetch logs
| summarize logSizeGB = sum( stringLength(content) )*1000 / 1024 / 1024 / 1024 , by:{}

```

 ![JoseRomero_0-1716562230105.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/dc76f2f76ed4afec63e8afe37c183680048d80b4.png)
