# Max Characters Length for JSON in transaction labels

**URL:** <https://discuss.elastic.co/t/max-characters-length-for-json-in-transaction-labels/370257>\
**Category:** APM\
**Tags:** python\
**Created:** [November 9, 2024, 4:27pm UTC](https://discuss.elastic.co/t/max-characters-length-for-json-in-transaction-labels/370257 "2024-11-09T16:27:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkaniaa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mkaniaa/32/138787_2.png) [@mkaniaa](https://discuss.elastic.co/u/mkaniaa)\
**Post date:** [November 9, 2024, 4:27pm UTC](https://discuss.elastic.co/t/max-characters-length-for-json-in-transaction-labels/370257/1 "2024-11-09T16:27:36Z")

</div>

Hello, I am running a Flask application (v3.0.2) with Elastic APM integrated via the `elastic-apm` package (v6.23.0). In APM, I am trying to add a custom label for my transactions containing the outgoing HTTP response body:

```auto
@app.after_request
def apm_label_response_data(response):
    response_data = response.get_json(silent=True)
    limited_data = json.dumps(response_data)[:10000]
    elasticapm.label(response_body=limited_data)
        
    return response

```

The problem is that my limit for characters doesn’t seem to take effect, as the JSON is still truncated to only 1024 characters. I believe the reason is explained [**here**](https://discuss.elastic.co/t/character-limit-in-fields-longer-then-1024-truncated-with-ellipsis/280415/5). Is there any way to adjust this limit for my label?
