This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-nginx-lua.git


The following commit(s) were added to refs/heads/master by this push:
     new 7e4fd14  doc: emphasize that the finish should be called only when the 
output is finished (#2)
7e4fd14 is described below

commit 7e4fd1410ca25d4f3987efd5c6bce1a14956d766
Author: 罗泽轩 <[email protected]>
AuthorDate: Tue Feb 25 14:02:33 2020 +0800

    doc: emphasize that the finish should be called only when the output is 
finished (#2)
---
 README.md           | 4 +++-
 examples/nginx.conf | 8 ++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 438e297..066a865 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,9 @@ http {
             proxy_pass http://127.0.0.1:8080/backend;
 
             body_filter_by_lua_block {
-                require("tracer"):finish()
+                if ngx.arg[2] then
+                    require("tracer"):finish()
+                end
             }
 
             log_by_lua_block {
diff --git a/examples/nginx.conf b/examples/nginx.conf
index 3400519..0eaa3bc 100644
--- a/examples/nginx.conf
+++ b/examples/nginx.conf
@@ -57,7 +57,9 @@ http {
             proxy_pass http://127.0.0.1:8080/tier2/lb;
 
             body_filter_by_lua_block {
-                require("tracer"):finish()
+                if ngx.arg[2] then
+                    require("tracer"):finish()
+                end
             }
 
             log_by_lua_block {
@@ -75,7 +77,9 @@ http {
             proxy_pass http://127.0.0.1:8080/backend;
 
             body_filter_by_lua_block {
-                require("tracer"):finish()
+                if ngx.arg[2] then
+                    require("tracer"):finish()
+                end
             }
 
             log_by_lua_block {

Reply via email to