feat(core): do not include DNS query time in HTTP response time
Fix #49
Summary
See #49
- Fixing response time for other request types needs to be added in a newer issue
- I don't know how to add a test for this, it would need some kind of mock for getting the time to be able to override it in the test.
Checklist
- [ ] Tested and/or added tests to validate that the changes work as intended, if applicable.
- [ ] Updated documentation in
README.md, if applicable.
I know the issue's been open for a while, but I'm perplexed about whether this is the right call. In a real-life production scenario, a DNS call does occur, so is excluding the DNS call from Gatus really the right move? 🤔
I can probably make this an optional feature (disabled by default) for each HTTP endpoint. But then maybe it makes more sense to add the feature for each kind of request.
@TwiN What do you think about creating new placeholders specifically for the values for DNS query time and protocol response time, and leaving the [RESPONSE_TIME] placeholder untouched?
My patch has to be improved in any case because it is not clear if the DNSDone event can be triggered multiple times (is it asynchronous? what happens when there are multiple records for a name?)