tracers.asciidoc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ==== Request tracing
  2. You can trace individual requests made on the HTTP and transport layers.
  3. WARNING: Tracing can generate extremely high log volumes that can destabilize
  4. your cluster. Do not enable request tracing on busy or important clusters.
  5. [[http-rest-request-tracer]]
  6. ===== REST request tracer
  7. The HTTP layer has a dedicated tracer that logs incoming requests and the
  8. corresponding outgoing responses. Activate the tracer by setting the level of
  9. the `org.elasticsearch.http.HttpTracer` logger to `TRACE`:
  10. [source,console]
  11. --------------------------------------------------
  12. PUT _cluster/settings
  13. {
  14. "persistent" : {
  15. "logger.org.elasticsearch.http.HttpTracer" : "TRACE"
  16. }
  17. }
  18. --------------------------------------------------
  19. You can also control which URIs will be traced, using a set of include and
  20. exclude wildcard patterns. By default every request will be traced.
  21. [source,console]
  22. --------------------------------------------------
  23. PUT _cluster/settings
  24. {
  25. "persistent" : {
  26. "http.tracer.include" : "*",
  27. "http.tracer.exclude" : ""
  28. }
  29. }
  30. --------------------------------------------------
  31. [[transport-tracer]]
  32. ===== Transport tracer
  33. The transport layer has a dedicated tracer that logs incoming and outgoing
  34. requests and responses. Activate the tracer by setting the level of the
  35. `org.elasticsearch.transport.TransportService.tracer` logger to `TRACE`:
  36. [source,console]
  37. --------------------------------------------------
  38. PUT _cluster/settings
  39. {
  40. "persistent" : {
  41. "logger.org.elasticsearch.transport.TransportService.tracer" : "TRACE"
  42. }
  43. }
  44. --------------------------------------------------
  45. You can also control which actions will be traced, using a set of include and
  46. exclude wildcard patterns. By default every request will be traced except for
  47. fault detection pings:
  48. [source,console]
  49. --------------------------------------------------
  50. PUT _cluster/settings
  51. {
  52. "persistent" : {
  53. "transport.tracer.include" : "*",
  54. "transport.tracer.exclude" : "internal:coordination/fault_detection/*"
  55. }
  56. }
  57. --------------------------------------------------