README.md in fluent-plugin-http_shadow-0.1.0 vs README.md in fluent-plugin-http_shadow-0.1.1
- old
+ new
@@ -86,9 +86,46 @@
header_hash { "Referer": "${referer}", "User-Agent": "${user_agent}" }
cookie_hash {"rails-app_session": "${session_id}"}
</match>
```
+## Examples(use rate_per_method_hash)
+```
+<match http_shadow.exsample>
+ type http_shadow
+ host_hash {
+ "www.example.com": "staging.example.com",
+ "api.example.com": "api-staging.example.com",
+ "blog.ipros.jp": "blog-staging.ipros.jp"
+ }
+ host_key host
+ path_format ${path}
+ method_key method
+ header_hash { "Referer": "${referer}", "User-Agent": "${user_agent}" }
+ rate_per_method_hash {
+ "get": 30, # This means 30% requests of GET will be sent. Default(when not defined) value is 100.
+ "post": 90
+ }
+</match>
+```
+
+## Examples(use support_methods)
+```
+<match http_shadow.exsample>
+ type http_shadow
+ host_hash {
+ "www.example.com": "staging.example.com",
+ "api.example.com": "api-staging.example.com",
+ "blog.ipros.jp": "blog-staging.ipros.jp"
+ }
+ host_key host
+ path_format ${path}
+ method_key method
+ header_hash { "Referer": "${referer}", "User-Agent": "${user_agent}" }
+ support_methods [ "get", "post" ] # It means that only GET and POST are sent. By default all methods are sent.
+</match>
+```
+
## note
default GET Request.
## parameter