Log4J2 BurstFilter for Sentry Appender

Hi,

To avoid some SPAM on our sentry instance, I want to limit the rate of send message on the client level.

I was hopping to do that in the log4j2 configuration.

I tried many configuration, looked in the documentation but no success. :cry:

Ideally I want to reuse BurstFilter from Log4J2
Something like that ;

<Configuration status="warn" packages="io.sentry.log4j2">
    <Appenders>
        <Sentry name="Sentry" >
            <filters>
                <BurstFilter level="error" rate="16" maxBurst="100"/>
            </filters>
        </Sentry>
    </Appenders>
    <Loggers>
        <Logger name="com.acme" level="info" additivity="false">
            <AppenderRef ref="Sentry" level=" " />
        </Logger>
    </Loggers>
</Configuration>

Is this possible ?

Links:
BurstFilter: BurstFilter (Apache Log4j Core 2.14.1 API)

I looked in the subject with a fresh head and a colleague.

In fact, it’s pretty simple.
The correct configuration is :

<Configuration status="warn" packages="io.sentry.log4j2">
    <Appenders>
        <Sentry name="Sentry" >
                <BurstFilter level="error" rate="16" maxBurst="100"/>
        </Sentry>
    </Appenders>
    <Loggers>
        <Logger name="com.acme" level="info" additivity="false">
            <AppenderRef ref="Sentry" level=" " />
        </Logger>
    </Loggers>
</Configuration>