# Documentation is no longer aligned with the code?

**URL:** <https://discuss.elastic.co/t/documentation-is-no-longer-aligned-with-the-code/185918>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [June 15, 2019, 12:48am UTC](https://discuss.elastic.co/t/documentation-is-no-longer-aligned-with-the-code/185918 "2019-06-15T00:48:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [June 15, 2019, 12:48am UTC](https://discuss.elastic.co/t/documentation-is-no-longer-aligned-with-the-code/185918/1 "2019-06-15T00:48:12Z")

</div>

Hi,

The goal is to follow proper procedure since I believe this is a doc bug and I would like to open an issue.

Heartbeat exported fields doc contain 3 notes saying the timers might not be what they seem to be:

> [@](#):
>
> Note: if validator is not reading body or only a prefix, this number does not fully represent the total time needed to read the body.

> **[HTTP monitor fields | Heartbeat Reference \[7.1\] | Elastic](https://www.elastic.co/guide/en/beats/heartbeat/7.1/exported-fields-http.html#_validate_body_fields)**

This was put there by urso in 2017.

Then on Nov 2018, it appear this "special case" was considered a bug in Heartbeat and fixed by Andrew\_Cholakian1 in 6.6:

> <https://github.com/elastic/beats/pull/8894>
>
> We currently do not read the entire HTTP body unless the user has a regex match …declared. We should always do this as part of our HTTP checks.

**The question is:**  
What is this note now talking about? (The one in the doc about the timer and validator...)

The meaning of the timers are becoming really important for me currently and the code and doc are now confusing me more so I'm digging 🤓

Unrelated but context never hurts:

- Heartbeat 6.7.2
- Elasticsearch 5.6.12 (yes, yes, I know 🙂 but I had no choice and I'm upgrading soon. )
- Sample of a monitor:

```auto
- type: http
  name: alibabacloud_website_internet_https_global_notice
  # List or urls to query
  urls:
    - https://www.alibabacloud.com/notice
  check.request:
    method: GET
  check.response:
    status: 200
  ssl:
    verification_mode: none
  mode: any
  # Configure task schedule
  schedule: '@every 10s'
  # Total test connection and data exchange timeout
  timeout: 25s

```

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [June 17, 2019, 5:50pm UTC](https://discuss.elastic.co/t/documentation-is-no-longer-aligned-with-the-code/185918/2 "2019-06-17T17:50:26Z")

</div>

Thanks for digging into this. We should remove that note, you are correct it is no longer accurate.

I have an open issue to fix / consolidate these fields here: [https://github.com/elastic/beats/issues/11476](https://github.com/elastic/beats/issues/11476)

I haven't had the time to get to it however.

I've also been thinking about there being a better way of doing timing. We currently have a number of timers within the app that can overlap. Understanding the definitions can be confusing.

It may be easier to just have a start/end timer, with offset values in between for various events. In other words, mark events over a span rather than report a bunch of different durations.

WDYT @martinr_ubi?

---

<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 15, 2019, 5:50pm UTC](https://discuss.elastic.co/t/documentation-is-no-longer-aligned-with-the-code/185918/3 "2019-07-15T17:50:46Z")

</div>

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