You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Cheol-Soon-Choi (via GitHub)" <gi...@apache.org> on 2023/03/14 10:12:37 UTC

[GitHub] [apisix-java-plugin-runner] Cheol-Soon-Choi opened a new issue, #233: request help: How do I pass the values created by the runner filter to the next plugin?

Cheol-Soon-Choi opened a new issue, #233:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/233

   ### Issue description
   My final goal is to put variables created in the runner plugin into the elastic logger.
   
   ex) 
   step1. make variable in runner plugin and pass variable to next plugin
   `@Override
   public void filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) {
   String test_value = "bar";
   chain.filter(request, response);
    }`
   
   step2. Business logic is executed through the variable (test_value) passed from the plug-in in the next step.
   
   step3. The passed variables are finally recorded in the elastic logger.
   `curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/elasticsearch-logger \
   -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "log_format": {
           "foo": "$test_value"
       }
   }'`
   
   I want to know how to pass the created variable (header value?) and record it in the logger.
   
   ### Environment
   
   * your apisix-java-plugin-runner version = 3.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org