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

fix: http request metrics(#1611) #1612

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

eroznik
Copy link
Contributor

@eroznik eroznik commented Oct 28, 2024

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@eroznik
Copy link
Contributor Author

eroznik commented Oct 28, 2024

Tested the fix locally and the results seem to be in line with what logs are stating

http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="0.005"} 0
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="0.01"} 0
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="0.025"} 0
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="0.05"} 0
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="0.1"} 0
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="0.25"} 1
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="0.5"} 3
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="1"} 7
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="2.5"} 7
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="5"} 7
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="10"} 7
http_requests_duration_seconds_bucket{app="keto",buildTime="undefined",code="403",endpoint="/relation-tuples/check",hash="undefined",method="post",version="master",le="+Inf"} 7
INFO[2024-10-28T15:42:48+01:00] completed handling request                    http_request=map[headers:map[accept:application/json, */* accept-encoding:gzip, deflate connection:keep-alive content-length:21 content-type:application/json user-agent:HTTPie/1.0.3] host:localhost:4466 method:POST path:/relation-tuples/check query:<nil> remote:127.0.0.1:48102 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:18 status:403 text_status:Forbidden took:410.978327ms]
INFO[2024-10-28T15:42:50+01:00] completed handling request                    http_request=map[headers:map[accept:application/json, */* accept-encoding:gzip, deflate connection:keep-alive content-length:21 content-type:application/json user-agent:HTTPie/1.0.3] host:localhost:4466 method:POST path:/relation-tuples/check query:<nil> remote:127.0.0.1:48112 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:18 status:403 text_status:Forbidden took:861.176379ms]
INFO[2024-10-28T15:42:52+01:00] completed handling request                    http_request=map[headers:map[accept:application/json, */* accept-encoding:gzip, deflate connection:keep-alive content-length:21 content-type:application/json user-agent:HTTPie/1.0.3] host:localhost:4466 method:POST path:/relation-tuples/check query:<nil> remote:127.0.0.1:48122 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:18 status:403 text_status:Forbidden took:859.001853ms]
INFO[2024-10-28T15:42:53+01:00] completed handling request                    http_request=map[headers:map[accept:application/json, */* accept-encoding:gzip, deflate connection:keep-alive content-length:21 content-type:application/json user-agent:HTTPie/1.0.3] host:localhost:4466 method:POST path:/relation-tuples/check query:<nil> remote:127.0.0.1:48130 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:18 status:403 text_status:Forbidden took:650.215369ms]
INFO[2024-10-28T15:42:54+01:00] completed handling request                    http_request=map[headers:map[accept:application/json, */* accept-encoding:gzip, deflate connection:keep-alive content-length:21 content-type:application/json user-agent:HTTPie/1.0.3] host:localhost:4466 method:POST path:/relation-tuples/check query:<nil> remote:127.0.0.1:48140 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:18 status:403 text_status:Forbidden took:123.770087ms]
INFO[2024-10-28T15:42:55+01:00] completed handling request                    http_request=map[headers:map[accept:application/json, */* accept-encoding:gzip, deflate connection:keep-alive content-length:21 content-type:application/json user-agent:HTTPie/1.0.3] host:localhost:4466 method:POST path:/relation-tuples/check query:<nil> remote:127.0.0.1:48152 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:18 status:403 text_status:Forbidden took:384.83215ms]
INFO[2024-10-28T15:42:56+01:00] completed handling request                    http_request=map[headers:map[accept:application/json, */* accept-encoding:gzip, deflate connection:keep-alive content-length:21 content-type:application/json user-agent:HTTPie/1.0.3] host:localhost:4466 method:POST path:/relation-tuples/check query:<nil> remote:127.0.0.1:48156 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:18 status:403 text_status:Forbidden took:843.30234ms]
INFO[2024-10-28T15:42:57+01:00] completed handling request                    http_request=map[headers:map[accept:*/* user-agent:curl/7.68.0] host:localhost:4466 method:GET path:/metrics/prometheus query:<nil> remote:127.0.0.1:42254 scheme:http] http_response=map[headers:map[content-type:text/plain; version=0.0.4; charset=utf-8; escaping=values] size:83103 status:200 text_status:OK took:1.342535ms]

@aeneasr aeneasr merged commit b2e6d34 into ory:master Oct 29, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants