public DocumentOperationParameters withTraceLevel(int traceLevel) {
        if (traceLevel < 0 || traceLevel > 9)
            throw new IllegalArgumentException("Trace level must be from 0 (no tracing) to 9 (maximum)");

        return new DocumentOperationParameters(priority, fieldSet, route, traceLevel, deadline, responseHandler);
    }
Sets the trace level for an operation.
documentapi/src/main/java/com/yahoo/documentapi/DocumentOperationParameters.java