Kong/kong-plugin-zipkin

krs, krf, kaf, kas, khs, kbf, kbs, khf

supers66 opened this issue · 1 comments

What do krs, krf, kaf, kas, khs, kbf, kbs, khf mean?

Hi, these annotations mark the start and end of different phases through which Kong goes when processing requests.

Here're the ones you are asking about:

  • krs - kong.rewrite.start
  • krf - kong.rewrite.finish
  • kas - kong.access.start
  • kaf - kong.access.finish
  • kbs - kong.body_filter.start
  • kbf - kong.body_filter.finish
  • khs - kong.header_filter.start
  • khf - kong.header_filter.finish

And here's a couple more, used when dealing with stream requests:

  • kps - kong.preread.start
  • kpf - kong.preread.finish

This information can be used to debug efficiency issues in Plugins. For example, you should be able to see if a plugin spends too much time processing response bodies (in the body_filter phase).

We use shortened names like kas because that's the customary thing to do in Zipkin (for instance, cs is "client send"). My understanding is that each character saved improves the overall efficiency of the Zipkin backend and UI, and decreases the size of the network packages sent to the server.

I have realized that the abbreviations were not correctly documented in the README. I will fix this. Thanks for asking!