# Unable to visualize span.http.response.status\_code

**URL:** <https://discuss.elastic.co/t/unable-to-visualize-span-http-response-status-code/246522>\
**Category:** Kibana\
**Created:** [August 26, 2020, 10:53pm UTC](https://discuss.elastic.co/t/unable-to-visualize-span-http-response-status-code/246522 "2020-08-26T22:53:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adams/32/56896_2.png) [@adamS](https://discuss.elastic.co/u/adamS)\
**Post date:** [August 26, 2020, 10:53pm UTC](https://discuss.elastic.co/t/unable-to-visualize-span-http-response-status-code/246522/1 "2020-08-26T22:53:05Z")

</div>

I'm unable to use the `span.http.response.status_code` field (or any of the `span.http` fields) on APM span documents when building a custom visualization.

I can see the info I want in Discover, but it says that it is type Unknown field and that there is "no cached mapping for this field". I've attempted "Refresh field list" several times on the `apm-*` index pattern. I've also attempted creating a new `apm*span*` index pattern, but it has the same issue.

Is `span.http.response.status_code` unavailable for Kibana visualizations, or is there something going wrong when I'm refreshing the field list? Thanks in advance

---

<div class="post-metadata">

**Author:** ![adamS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adams/32/56896_2.png) [@adamS](https://discuss.elastic.co/u/adamS)\
**Post date:** [August 27, 2020, 4:34pm UTC](https://discuss.elastic.co/t/unable-to-visualize-span-http-response-status-code/246522/2 "2020-08-27T16:34:09Z")

</div>

For anyone else that has this issue, this field `span.http` fields are not indexed by default.

I first had to overwrite the template with a new one containing the `span.http.response.status_code` field by adding this to my apm-server.yml:

```auto
setup.template.overwrite: true
setup.template.append_fields:
- name: span.http.response.status_code
  type: long

```

and restarted the APM-Server.

This fixed the issue for new data. In order to search on old data, I needed to reindex using the Reindex API:

`curl -XPOST "http://<elasticsearch>:9200/_reindex" -H 'Content-Type: application/json' -d'{"source":{"index":"apm-7.8.1-span-2020.08.26"},"dest":{"index":"apm-7.8.1-span-2020.08.26-reindexed"}}'`

and deleting the `apm-7.8.1-span-2020.08.26` index once I was done

---

<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:** [September 24, 2020, 4:34pm UTC](https://discuss.elastic.co/t/unable-to-visualize-span-http-response-status-code/246522/3 "2020-09-24T16:34:14Z")

</div>

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