Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection of minimum and maximum request latency for HTTP Inbound an… #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions examples/http-metrics-min-max/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Extend the HTTP Inbound/Outbound metrics with minimal and maximal request latency

By default, the inspect Ocelot Java Agent does not collect a minimum, maximum or percentile response time per time interval per HTTP endpoint. It is possible to expand the existing metric definitions with views to gather those additional metrics.

Below metric definitions result in two metrics for HTTP inbound/outbound requests:
* http_(in|out)_responsetime_min (quantile 0)
* http_(in|out)_responsetime_max (quantile 1)

```
inspectit:
metrics:
definitions:
'[http/in/responsetime]':
unit: ms
views:
'[http/in/responsetime]':
aggregation: QUANTILES
quantiles: [0, 1]
tags:
'http_path': true
'http_status': true
'http_method': true
'error': true
'[http/out/responsetime]':
unit: ms
views:
'[http/out/responsetime]':
aggregation: QUANTILES
quantiles: [0, 1]
tags:
'http_host': true
'http_path': true
'http_status': true
'http_method': true
'error': true
```

Percentile response times are possible by specifying quantiles within the range [0, 1]. 0.9 is the 90th percentile, 0.99 is the 0.99 percentile.

Further information can be found at [Custom Metrics](https://inspectit.github.io/inspectit-ocelot/docs/metrics/custom-metrics). Above configuration is available as [YAML file](http-metrics-min-max.yml).

26 changes: 26 additions & 0 deletions examples/http-metrics-min-max/http-metrics-min-max.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
inspectit:
metrics:
definitions:
'[http/in/responsetime]':
unit: ms
views:
'[http/in/responsetime]':
aggregation: QUANTILES
quantiles: [0, 1]
tags:
'http_path': true
'http_status': true
'http_method': true
'error': true
'[http/out/responsetime]':
unit: ms
views:
'[http/out/responsetime]':
aggregation: QUANTILES
quantiles: [0, 1]
tags:
'http_host': true
'http_path': true
'http_status': true
'http_method': true
'error': true