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

Export request duration metrics for Snyk HTTP client #205

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Jan 6, 2023

Example metrics:

httpcomponents_httpclient_request_seconds_max{client="snykHttpClient",method="GET",status="200",uri="UNKNOWN",} 0.688291934
httpcomponents_httpclient_request_seconds_count{client="snykHttpClient",method="GET",status="200",uri="UNKNOWN",} 71.0
httpcomponents_httpclient_request_seconds_sum{client="snykHttpClient",method="GET",status="200",uri="UNKNOWN",} 22.204852098

Note that the uri is always "UNKNOWN". We could add it, but there really is no point given we only ever call one endpoint of the Snyk API. And the URL would include the org ID and PURL, which would result in too many metric entries.

Signed-off-by: nscuro nscuro@protonmail.com

Example metrics:

```
httpcomponents_httpclient_request_seconds_max{client="snykHttpClient",method="GET",status="200",uri="UNKNOWN",} 0.688291934
httpcomponents_httpclient_request_seconds_count{client="snykHttpClient",method="GET",status="200",uri="UNKNOWN",} 71.0
httpcomponents_httpclient_request_seconds_sum{client="snykHttpClient",method="GET",status="200",uri="UNKNOWN",} 22.204852098
```

Note that the `uri` is always "UNKNOWN". We could add it, but there really is no point given we only ever call one URL. And the URL would include the org ID and PURL, which would result in too many metric entries.

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro added enhancement New feature or request domain/vuln-analysis labels Jan 6, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jan 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@kodiakhq kodiakhq bot merged commit a05d64d into main Jan 6, 2023
@kodiakhq kodiakhq bot deleted the apache-http-client-metrics branch January 6, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants