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

endpoint sequences: Server-Timing header only reports last requests/proxies #686

Closed
johakoch opened this issue Jan 31, 2023 · 1 comment · Fixed by #751
Closed

endpoint sequences: Server-Timing header only reports last requests/proxies #686

johakoch opened this issue Jan 31, 2023 · 1 comment · Fixed by #751
Assignees
Labels
bug Something isn't working
Milestone

Comments

@johakoch
Copy link
Collaborator

With endpoint sequences, server_timing_header = true only reports the "last" requests/proxies, not the dependencies.

server {
  hosts = ["*:8080"]

  endpoint "/**" {
    request "r" {
      url = "/req"
      backend = "be"
    }
    proxy { # has dependency "r"
      backend = "be"
      add_request_headers = {
        st = backend_responses.r.status
      }
    }
  }
}

definitions {
  backend "be" {
    origin = "http://localhost:8081"
  }
}

settings {
  server_timing_header = true
}

server {
  hosts = ["*:8081"]
  endpoint "/**" {
    response {
      status = 204
    }
  }
}
$ curl -si http://localhost:8080/foo
HTTP/1.1 204 No Content
...
Server-Timing: be_total;dur=0.709, be_ttfb;dur=0.452

Log (upstream):

INFO[0026]                                               backend=be build=dev custom="map[]" method=GET request="map[headers:map[] host:localhost method:GET name:r origin:localhost:8081 path:/req port:8081 proto:http]" response="map[bytes:0 headers:map[] status:204]" status=204 timings="map[dns:0.146 tcp:0.255 total:15.075 ttfb:0.511]" type=couper_backend uid=cfcf8ibeg9sborh08h9g url="http://localhost:8081/req" version=0
INFO[0026]                                               backend=be build=dev custom="map[]" depends_on=r method=GET request="map[headers:map[accept:*/* user-agent:curl/7.67.0] host:localhost method:GET name:default origin:localhost:8081 path:/foo port:8081 proto:http]" response="map[bytes:0 headers:map[] status:204]" status=204 timings="map[total:0.709 ttfb:0.452]" type=couper_backend uid=cfcf8ibeg9sborh08h9g url="http://localhost:8081/foo" version=0

As there are two backend requests (proxy "default") and request "r"), there should also be timings for request "r".

@johakoch johakoch added the bug Something isn't working label Jan 31, 2023
@malud
Copy link
Collaborator

malud commented Feb 3, 2023

blocked by #675

@johakoch johakoch added this to the 1.13 milestone Feb 16, 2023
@johakoch johakoch linked a pull request Mar 31, 2023 that will close this issue
@johakoch johakoch self-assigned this Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants