package net.kencochrane.raven.spi;

import org.json.simple.JSONObject;

/**
 * A JSONProcessor is used to modify JSON requests before they are sent to
 * Sentry. It is expected for a JSON processor to be singleton and be
 * thread-safe.
 *
 * To register JSONProcessors, refer to the settings of the appender used.
 *
 * @author vvasabi
 * @since 1.0
 */
public interface JSONProcessor {

    /**
     * This is called when a message is logged. Since
     * {@link #process(JSONObject)} may be executed on a different thread, this
     * method should copy any data the processor needs into {@link RavenMDC}.
     *
     * For each message logged, this method should be called exactly once.
     */
    void prepareDiagnosticContext();

    /**
     * Modify the JSON request object specified before it is sent to Sentry.
     * This method may be called concurrently and therefore must be thread-safe.
     *
     * @param json request JSON object to be modified
     * @param exception exception attached with the message and may be null
     */
    void process(JSONObject json, Throwable exception);

}

@@ -477,16 +477,27 @@
 ONObject
+, Throwable
 )%7D may b

Fix javadoc for JSONProcessor.prepareDiagnosticContext