How to add query parameters and body of requests to the analytics logs of wso2?

33 Views Asked by At

I want to have at least query parameters in analytics logs of wso2. The current pattern layout is:

appender.APIM_METRICS_APPENDER.layout.pattern = %d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n

What should I do?

I saw it is base on log4j, but I don't know which parameters should I use in layout pattern.

1

There are 1 best solutions below

0
RrR- On

Have you tried using a custom analytics data publisher [1] for this? You can use this to send additional data in the analytics event.

[1] - https://apim.docs.wso2.com/en/latest/api-analytics/samples/publishing-custom-analytics-data/